diff --git a/dev/devicelab/lib/command/test.dart b/dev/devicelab/lib/command/test.dart index e656c8bad1e7..c65a5da287d6 100644 --- a/dev/devicelab/lib/command/test.dart +++ b/dev/devicelab/lib/command/test.dart @@ -24,6 +24,11 @@ class TestCommand extends Command { '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 { silent: (argResults!['silent'] as bool?) ?? false, useEmulator: (argResults!['use-emulator'] as bool?) ?? false, taskArgs: taskArgs, + exitOnFirstTestFailure: argResults!['exit'] as bool, ); } }