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
Support swift test --id TestSuite.testName --id OtherTestSuite.testName
#7376
Comments
Let's consider |
@MaxDesiatov @bnbarham What do you think of this |
I'd say using |
xargs can run the command once with all the args unless you choose a count with -n iirc |
That's true but then we have the command line length restrictions back in place... So in the fullness of time, we'll need the |
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: