Skip to content

Add xtask option to run a single snapshot test by name#585

Merged
bors[bot] merged 3 commits intomainfrom
feature/run-single-snapshot-test
Sep 24, 2021
Merged

Add xtask option to run a single snapshot test by name#585
bors[bot] merged 3 commits intomainfrom
feature/run-single-snapshot-test

Conversation

@justahero
Copy link
Copy Markdown

@justahero justahero commented Sep 23, 2021

This is to only run a single snapshot test when checking things without running all tests again.

cargo xtask test-snapshot log

will only run the log snapshot test. In case no test name is given, all tests are run as before. The test name of the positional parameter (<single>) is checked against the allowed list of snapshot tests.

This is to only run a single snapshot test when checking things without
running all tests again.
Copy link
Copy Markdown
Contributor

@jonas-schievink jonas-schievink left a comment

Choose a reason for hiding this comment

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

Implementation looks good, feel free to send to bors

Comment thread xtask/src/main.rs Outdated
Comment thread xtask/src/main.rs Outdated
match source {
"all" => Ok(Snapshot::All),
test => {
if ALL_SNAPSHOT_TESTS.contains(&test) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This doesn't work with the conditionally-available alloc test, but that's probably not a big problem

Sebastian Ziebell added 2 commits September 24, 2021 15:30
This re-adds the logic to validate a given test with the available ones.
@jonas-schievink
Copy link
Copy Markdown
Contributor

bors r+

@bors
Copy link
Copy Markdown
Contributor

bors Bot commented Sep 24, 2021

Build succeeded:

@bors bors Bot merged commit 43f025f into main Sep 24, 2021
@bors bors Bot deleted the feature/run-single-snapshot-test branch September 24, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants