Support swift test --id TestSuite.testName --id OtherTestSuite.testName
#7376
Labels
swift test --id TestSuite.testName --id OtherTestSuite.testName
#7376
Description
There are use cases where another harness needs to or wants to invoke very specific tests in individual processes. Examples that come to mind:
LLVM_PROFILE_FILE
to a unique path per test)For these use cases (and I guess others) it would be beneficial to not select the test case via regex but via its ID (as obtained through
swift test list
).Furthermore, contrary to
swift test --filter DOES_NOT_EXIST
which will succeed (just selects 0 tests),swift test --id DOES_NOT_EXIST
should fail.Expected behavior
I'd expect
swift test --id TestSuite.test1 --id OtherTestSuite.test2 --id TestSuite.test3
toAdditionally it'd be great (but that's a stretch goal to work around command line length limits) if we could
swift test --ids-from-stdin
which would allow for exampleActual behavior
There is no such functionality today, to run exactly one specific test I need to:
TestProduct.TestSuite/testFoo(bar:)
becomes^TestProduct\.TestSuite\/testFoo\(bar:\)$
)Executed 1 test, with 0 failures
in the output)Steps to reproduce
n/a
Swift Package Manager version/commit hash
No response
Swift & OS version (output of
swift --version && uname -a
)No response
The text was updated successfully, but these errors were encountered: