Skip to content

Create an xunit results file even if no tests are run. #7066

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

Merged
merged 2 commits into from
Nov 30, 2023

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Nov 8, 2023

This PR ensures that when --xunit-output is passed to swift test --parallel, the output XML file is generated even if no tests are run.

Failure modes outside of test failures (i.e. errors thrown during the build process or when trying to run the test process) will still prevent the generation of this file.

Resolves #7065.

@grynspan
Copy link
Contributor Author

grynspan commented Nov 8, 2023

This PR is dependent on changes in #7047, so holding until that's merged.

@grynspan
Copy link
Contributor Author

grynspan commented Nov 8, 2023

@swift-ci please test

@grynspan grynspan force-pushed the jgrynspan/7065-xml-output branch 2 times, most recently from 26494c0 to 30d3c4c Compare November 18, 2023 14:22
@grynspan grynspan marked this pull request as ready for review November 18, 2023 14:22
@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan
Copy link
Contributor Author

@swift-ci please test Windows

@grynspan grynspan added the bug label Nov 18, 2023
This PR ensures that when `--xunit-output` is passed to `swift test --parallel`, the output XML file is generated even if no tests are run.

Failure modes outside of test failures (i.e. errors thrown during the build process or when trying to run the test process) will still prevent the generation of this file.

Resolves #7065.
@grynspan grynspan force-pushed the jgrynspan/7065-xml-output branch from 30d3c4c to 7b80344 Compare November 29, 2023 16:14
@grynspan grynspan requested a review from tomerd November 29, 2023 16:15
@grynspan
Copy link
Contributor Author

@swift-ci please test

@tomerd tomerd enabled auto-merge (squash) November 29, 2023 17:46
@tomerd
Copy link
Contributor

tomerd commented Nov 30, 2023

@swift-ci test windows

@tomerd tomerd merged commit 7411a19 into main Nov 30, 2023
@tomerd tomerd deleted the jgrynspan/7065-xml-output branch November 30, 2023 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Running swift test with 0 tests should create empty xunit results file
2 participants