Skip to content

Commit aea4552

Browse files
authored
add --exit flag to dev/devicelab/bin/test_runner.dart (flutter#134165)
Resolves flutter#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`.
1 parent 445e02d commit aea4552

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dev/devicelab/lib/command/test.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@ class TestCommand extends Command<void> {
2424
'settings in the test case, and will results in error if no device\n'
2525
'with given ID/ID prefix is found.',
2626
);
27+
argParser.addFlag(
28+
'exit',
29+
help: 'Exit on the first test failure. Currently flakes are intentionally (though '
30+
'incorrectly) not considered to be failures.',
31+
);
2732
argParser.addOption(
2833
'git-branch',
2934
help: '[Flutter infrastructure] Git branch of the current commit. LUCI\n'
@@ -90,6 +95,7 @@ class TestCommand extends Command<void> {
9095
silent: (argResults!['silent'] as bool?) ?? false,
9196
useEmulator: (argResults!['use-emulator'] as bool?) ?? false,
9297
taskArgs: taskArgs,
98+
exitOnFirstTestFailure: argResults!['exit'] as bool,
9399
);
94100
}
95101
}

0 commit comments

Comments
 (0)