Skip to content
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

Add an experimental CLI argument for passing a configuration value as JSON. #402

Merged
merged 2 commits into from
May 7, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented May 7, 2024

This PR adds a new CLI argument, --experimental-configuration-path, which can be used to specify the path to a file containing an instance of __CommandLineArguments_v0 encoded as JSON. /dev/stdin or a named pipe can be specified if desired.

Changes to SwiftPM will be needed to support passing this argument all the way through from swift test.

Checklist:

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

… JSON.

This PR adds a new CLI argument, `--experimental-configuration-path`, which can
be used to specify the path to a file containing an instance of
`__CommandLineArguments_v0` encoded as JSON. `/dev/stdin` or a named pipe can be
specified if desired.

Changes to SwiftPM will be needed to support passing this argument all the way
through from `swift test`.
@grynspan grynspan added enhancement New feature or request tools integration Integration of swift-testing into tools/IDEs labels May 7, 2024
@grynspan grynspan self-assigned this May 7, 2024
@grynspan grynspan requested a review from plemarquand May 7, 2024 13:00
@grynspan
Copy link
Contributor Author

grynspan commented May 7, 2024

@swift-ci please test

if args.contains("--list-tests") {
result.listTests = true
return result // do not bother parsing the other arguments
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This early return prevented saying --list-tests --verbose for example. Ditch it while I'm here.

@grynspan
Copy link
Contributor Author

grynspan commented May 7, 2024

@swift-ci please test

@grynspan grynspan requested a review from plemarquand May 7, 2024 15:54
@grynspan grynspan merged commit f5fd88e into main May 7, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/add-configuration-arg branch May 7, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tools integration Integration of swift-testing into tools/IDEs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants