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

Execute filtered tests with single XCTest invocation #2479

Merged
merged 1 commit into from
Feb 27, 2020
Merged

Execute filtered tests with single XCTest invocation #2479

merged 1 commit into from
Feb 27, 2020

Conversation

egorzhdan
Copy link
Contributor

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 of Executed 1 tests, with 0 failures 100 times.

This is the next step after swiftlang/swift-corelibs-xctest#268

@egorzhdan
Copy link
Contributor Author

Hey @aciidb0mb3r, could you please take a look? I'll resolve the conflicts if this PR makes sense in general.

#endif
}

func testFilteredTestCase() throws {
Copy link
Contributor

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?

Copy link
Contributor Author

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: ",")
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aciidgh
Copy link
Contributor

aciidgh commented Feb 25, 2020

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?

@aciidgh
Copy link
Contributor

aciidgh commented Feb 25, 2020

Ooh, I see you added support for this in corelibs-xctest 😃

Please go ahead and rebase!

@aciidgh
Copy link
Contributor

aciidgh commented Feb 27, 2020

@swift-ci smoke test

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

Successfully merging this pull request may close these issues.

2 participants