-
Notifications
You must be signed in to change notification settings - Fork 103
Provide a JSON API to *just* list tests (via the callback, not stdout) #506
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
Comments
It exits early, actually. We have not defined a stable JSON interface for input yet. If and when we do, it will likely include some sort of "list only" flag that produces a sequence of test records but does not run them. |
Thanks! You're right—I misread the following
That sounds good to me! I should be able to work with the existing behavior until then. |
Actually, I'm going to reopen this and use it to track an experimental implementation of the described functionality, assuming it won't break VS Code. @plemarquand are you passing any additional arguments when you call |
Tracked internally with rdar://130627856 |
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
This PR changes the behavior of `swift test list` and its various synonyms to allow reporting the list of tests via the ABI-stable JSON mechanism described in #479. As it is not currently possible to directly call `swift test list --experimental-event-stream-output ... --experimental-event-stream-version 0`, it's a bit hard to test this code. However, it is possible to opt into this mode using `--experimental-configuration-path` and passing a path to a JSON file that includes `"listTests": true` (as noted by @allevato.) Resolves #506. Resolves rdar://130627856.
Description
If the JSON ABI entry point is used with
listTests: true
in its configuration, then the framework prints the list of all tests to stdout and then continues on executing tests (implementation).However, a client of the JSON entry point may want to query which tests are available without running anything yet. I think this can be hacked up today by passing in a filter regex that could not possibly match any test ID; then, the framework would terminate after running nothing. (Disclaimer: I haven't actually tried this.) However, doing so would still require the calling process to redirect stdout temporarily and then parse the output line-by-line.
Would it be possible for the JSON entry point to provide a mode where
listTests: true
(or something like it with a different name, if we need to preserve the current behavior) would report the list of tests back to the caller via the callback as a JSON payload instead, returning immediately without running anything?Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
swift-testing version/commit hash
main
Swift & OS version (output of
swift --version && uname -a
)No response
The text was updated successfully, but these errors were encountered: