Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assertion failure when retrying: (anyTestRunSpecification) should not be nil. #2

Open
littlebobert opened this issue Sep 7, 2018 · 1 comment

Comments

@littlebobert
Copy link

littlebobert commented Sep 7, 2018

Thank you for creating this plugin!

To test it I added an XCTFail to one of my tests, and when fastlane retries it, doing:

set -o pipefail && env NSUnbufferedIO=YES xcodebuild -workspace /Users/justingarcia/dev/iOS/Procore.xcworkspace -scheme Procore-CI -destination 'platform=iOS Simulator,id=<some id>' -derivedDataPath '/Users/justingarcia/Library/Developer/Xcode/DerivedData/Procore-erlrjkmgplfjaqghpgbtdfiknmmz' -resultBundlePath '/Users/justingarcia/dev/iOS/fastlane/test_output/Retry2/Procore-CI.test_result' -only-testing:Procore-CI/PhotoCommentImportTests/testPhotoCommentsImporting test-without-building | tee '/Users/justingarcia/Library/Logs/scan/Procore-Procore-CI.log' | xcpretty --report html --output '/Users/justingarcia/dev/iOS/fastlane/test_output/Retry2/report.html' --report junit --output '/Users/justingarcia/dev/iOS/fastlane/test_output/Retry2/report.junit' --report junit --output '/var/folders/51/3fwhxj3110l7jf06mj0psm2w0000gn/T/junit_report20180907-51510-14dfqvw'

I hit:

2018-09-07 10:16:40.015 xcodebuild[61366:2238714] [MT] DVTAssertions: ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-14161/IDEFoundation/Execution/Schemes/IDETestSchemeAction.m:272
Details: (anyTestRunSpecification) should not be nil.
Object: <IDETestSchemeAction: 0x7fbba4e9f800>
Method: -testOperationWithSchemeOperationParameters:testManager:withBuildOperation:buildParameters:schemeCommand:actionRecord:testRunSpecifications:deviceAvailableChecker:outError:actionCallbackBlock:
Thread: <NSThread: 0x7fbb9f705060>{number = 1, name = main}
Hints:

Backtrace:
0 -[DVTAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in DVTFoundation)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[IDETestSchemeAction testOperationWithSchemeOperationParameters:testManager:withBuildOperation:buildParameters:schemeCommand:actionRecord:testRunSpecifications:deviceAvailableChecker:outError:actionCallbackBlock:] (in IDEFoundation)
4 -[IDEScheme _executionOperationForSchemeOperationParameters:build:onlyBuild:buildParameters:title:buildLog:dontActuallyRunCommands:restorePersistedBuildResults:deviceAvailableChecker:error:actionCallbackBlock:] (in IDEFoundation)
5 -[IDEScheme schemeOperationForSchemeOperationParameters:buildLog:overridingProperties:overridingBuildConfiguration:dontActuallyRunCommands:restorePersistedBuildResults:deviceAvailableChecker:error:completionBlock:] (in IDEFoundation)
6 -[IDEScheme schemeOperationForSchemeOperationParameters:buildLog:overridingProperties:overridingBuildConfiguration:dontActuallyRunCommands:restorePersistedBuildResults:error:completionBlock:] (in IDEFoundation)
7 -[Xcode3CommandLineBuildTool _buildWithTimingSection:] (in Xcode3Core)
8 -[Xcode3CommandLineBuildTool run] (in Xcode3Core)
9 main (in xcodebuild)
10 start (in libdyld.dylib)

I saw this SO post but their solution didn’t apply, we’re using a relative path for -only-testing. Any ideas? Let me know what other information I can provide.

@littlebobert
Copy link
Author

We use multiple modules in our project and the path passed to -only-testing doesn’t include the name of the module that that test is in, but I tried including it and running the aforementioned command manually and I get the same assertion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant