-
Notifications
You must be signed in to change notification settings - Fork 267
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
Ignore the --testing-library
argument we are going to start passing from SwiftPM.
#490
base: main
Are you sure you want to change the base?
Conversation
… from SwiftPM. This PR adds functionality to XCTest's argument parser that allows it to skip arguments that the caller may specify but which are uninteresting to XCTest. Specifically, we are planning to start passing `--testing-library xctest` to the test runner process in order to disambiguate runs of XCTest from runs of Swift Testing, and we need to make sure this does not cause XCTest to run incorrectly. Resolves rdar://129695171.
@swift-ci please test |
@swift-ci please test |
} | ||
|
||
let arguments = ["main", "--testing-library=xctest", "--testing-library", "xctest", "\(String(reflecting: ArgumentParsingTestCase.self))/testSuccess", "--testing-library",] | ||
XCTMain([testCase(ArgumentParsingTestCase.allTests)], arguments: arguments) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be any checks on the output/result from this? Does this test fail (and how) without the product code change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test checks the exit code of the process, which should be non-zero if argument parsing failed.
That's my read anyway—you know this code better than I do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sure, makes sense from re-reading the code.
@swift-ci please test |
@swift-ci please test Windows |
This PR adds functionality to XCTest's argument parser that allows it to skip arguments that the caller may specify but which are uninteresting to XCTest. Specifically, we are planning to start passing
--testing-library xctest
to the test runner process in order to disambiguate runs of XCTest from runs of Swift Testing, and we need to make sure this does not cause XCTest to run incorrectly.Resolves rdar://129695171.