Skip to content

Commit

Permalink
add --exit flag to dev/devicelab/bin/test_runner.dart (#134165)
Browse files Browse the repository at this point in the history
Resolves #134070 

Adds a flag to the `test_runner.dart test` script that will cause the test runner to exit upon first failure (or, said another way, exit without retrying).

This is in parity with the `--exit` flag of `dev/devicelab/bin/run.dart`.
  • Loading branch information
andrewkolos authored Sep 7, 2023
1 parent 445e02d commit aea4552
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dev/devicelab/lib/command/test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ class TestCommand extends Command<void> {
'settings in the test case, and will results in error if no device\n'
'with given ID/ID prefix is found.',
);
argParser.addFlag(
'exit',
help: 'Exit on the first test failure. Currently flakes are intentionally (though '
'incorrectly) not considered to be failures.',
);
argParser.addOption(
'git-branch',
help: '[Flutter infrastructure] Git branch of the current commit. LUCI\n'
Expand Down Expand Up @@ -90,6 +95,7 @@ class TestCommand extends Command<void> {
silent: (argResults!['silent'] as bool?) ?? false,
useEmulator: (argResults!['use-emulator'] as bool?) ?? false,
taskArgs: taskArgs,
exitOnFirstTestFailure: argResults!['exit'] as bool,
);
}
}

0 comments on commit aea4552

Please sign in to comment.