Running swift test --xunit-output
with --disable-xctest
doesn't generate test output file
#8000
Closed
1 task done
Labels
Is it reproducible with SwiftPM command-line tools:
swift build
,swift test
,swift package
etc?swift build
,swift test
,swift package
etc.Description
I had been noticing this in the Swift 6.0 snapshots but thought it would be fixed for Swift 6.0 final release. However, I still see this behavior in the official Swift 6.0.0 toolchain.
I am using
swift-testing
in all of my projects. I noticed, however, that if I use the--disable-xctest
flag withswift test
, then--xunit-output
does not actually output a file. For example:If I remove
--disable-xctest
, it creates an output file, although it also doesn't have the name I expect:Is this a known issue or something that is intended to be fixed in the future? I want to be able to completely disable XUnit in my test suites and have test results output generated correctly.
Expected behavior
I expect that if I run
swift test
with--disable-xctest
and--xunit-output
together, that an output XML file is generated using the specified name with the test results.Actual behavior
I see that if I run
swift test
with--disable-xctest
along with--xunit-output
, no output file is generated at all.Steps to reproduce
swift-testing
only (no XCTest cases).swift test --xunit-output output.xml --disable-xctest
.Swift Package Manager version/commit hash
Not sure, it's the one that is shipped with the Swift 6.0 toolchain for Ubuntu 22.04.
Swift & OS version (output of
swift --version ; uname -a
)Swift version 6.0 (swift-6.0-RELEASE)
Target: x86_64-unknown-linux-gnu
Linux Ruby 5.15.0-122-generic #132-Ubuntu SMP Thu Aug 29 13:45:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: