Skip to content

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jun 28, 2024

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 --event-stream-output-path ... --event-stream-version 0, it's a bit hard to test this code. However, it is possible to opt into this mode using --configuration-path and passing a path to a JSON file that includes "listTests": true (as noted by @allevato.) Support for these arguments with swift test list is tracked by swiftlang/swift-package-manager#7768.

Resolves #506.
Resolves rdar://130627856.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@grynspan grynspan added enhancement New feature or request swiftpm-integration 📦 Swift Package Manager integration tools integration 🛠️ Integration of swift-testing into tools/IDEs labels Jun 28, 2024
@grynspan grynspan self-assigned this Jun 28, 2024
@grynspan grynspan force-pushed the jgrynspan/506-json-records-for-listing-tests branch from b7d7088 to 6bbdb36 Compare June 28, 2024 01:24
@grynspan grynspan force-pushed the jgrynspan/506-json-records-for-listing-tests branch 2 times, most recently from 2faa04c to c4da69f Compare July 10, 2024 13:07
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.
@grynspan grynspan force-pushed the jgrynspan/506-json-records-for-listing-tests branch from c4da69f to 74421ee Compare July 10, 2024 21:21
@grynspan grynspan marked this pull request as ready for review July 10, 2024 21:21
@grynspan
Copy link
Contributor Author

@swift-ci please test

@grynspan grynspan merged commit 55ca2b7 into main Jul 12, 2024
@grynspan grynspan deleted the jgrynspan/506-json-records-for-listing-tests branch July 12, 2024 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request swiftpm-integration 📦 Swift Package Manager integration tools integration 🛠️ Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a JSON API to *just* list tests (via the callback, not stdout)
2 participants