[ddc] Add help flag to hot reload suite
Change-Id: I5057286044420711a8d633179baba6a4414d6b10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/387144
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
diff --git a/pkg/dev_compiler/test/hot_reload_suite.dart b/pkg/dev_compiler/test/hot_reload_suite.dart
index bc65326..a3c6c82 100644
--- a/pkg/dev_compiler/test/hot_reload_suite.dart
+++ b/pkg/dev_compiler/test/hot_reload_suite.dart
@@ -29,6 +29,7 @@
final testDiffSeparator = '/** DIFF **/';
final argParser = ArgParser()
+ ..addFlag('help', abbr: 'h', help: 'Display this message.', negatable: false)
..addOption('runtime',
abbr: 'r',
defaultsTo: 'd8',
@@ -71,6 +72,10 @@
Future<void> main(List<String> args) async {
final argResults = argParser.parse(args);
+ if (argResults['help'] as bool) {
+ print(argParser.usage);
+ return;
+ }
final runtimePlatform =
RuntimePlatforms.values.byName(argResults['runtime'] as String);
final testNameFilter = RegExp(argResults['filter'] as String);