-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Execute filtered tests with single XCTest invocation #2479
Conversation
Hey @aciidb0mb3r, could you please take a look? I'll resolve the conflicts if this PR makes sense in general. |
#endif | ||
} | ||
|
||
func testFilteredTestCase() throws { |
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.
We probably already have such integration tests, can you update the existing ones as these are costly to run?
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.
Oh right, I didn't notice the integration tests. There is currently a test which invokes swift test
(XCBuildTests.testSwiftTest
) but it seems to be specific to the Xcode build system, so I've added a new one – BasicTests.testSwiftTest
.
) | ||
ranSuccessfully = runner.test() && ranSuccessfully | ||
} | ||
xctestArg = tests.map { $0.specifier }.joined(separator: ",") |
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.
Aah. Does this also work on Linux?
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.
It does! There is a test for this in the XCTest project: https://github.com/apple/swift-corelibs-xctest/blob/e52fc6555b5aa9923f053d9a54660fa4b2c54690/Tests/Functional/SelectedTest/main.swift#L4
Hey @egorzhdan! I missed this PR, thanks for the reminder! This seems like a good improvement but do you mind checking if this also works on Linux? |
Ooh, I see you added support for this in corelibs-xctest 😃 Please go ahead and rebase! |
@swift-ci smoke test |
This improves performance by decreasing the number of spawned XCTest processes & makes the testing results output more convenient –
Executed 100 tests, with 0 failures
will be printed instead ofExecuted 1 tests, with 0 failures
100 times.This is the next step after swiftlang/swift-corelibs-xctest#268