Unverified Commit aea4552a authored by Andrew Kolos's avatar Andrew Kolos Committed by GitHub

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`.
parent 445e02dd
...@@ -24,6 +24,11 @@ class TestCommand extends Command<void> { ...@@ -24,6 +24,11 @@ class TestCommand extends Command<void> {
'settings in the test case, and will results in error if no device\n' 'settings in the test case, and will results in error if no device\n'
'with given ID/ID prefix is found.', '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( argParser.addOption(
'git-branch', 'git-branch',
help: '[Flutter infrastructure] Git branch of the current commit. LUCI\n' help: '[Flutter infrastructure] Git branch of the current commit. LUCI\n'
...@@ -90,6 +95,7 @@ class TestCommand extends Command<void> { ...@@ -90,6 +95,7 @@ class TestCommand extends Command<void> {
silent: (argResults!['silent'] as bool?) ?? false, silent: (argResults!['silent'] as bool?) ?? false,
useEmulator: (argResults!['use-emulator'] as bool?) ?? false, useEmulator: (argResults!['use-emulator'] as bool?) ?? false,
taskArgs: taskArgs, taskArgs: taskArgs,
exitOnFirstTestFailure: argResults!['exit'] as bool,
); );
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment