mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
add --exit flag to dev/devicelab/bin/test_runner.dart (#134165)
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`.
This commit is contained in:
parent
445e02dd63
commit
aea4552acd
@ -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'
|
||||
@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user