Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: tools/gardening/bin/bot.dart

Issue 2999043003: Use package:testing for tools/gardening (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:io'; 6 import 'dart:io';
7 7
8 import 'compare_failures.dart' as compare_failures; 8 import 'compare_failures.dart' as compare_failures;
9 import 'current_summary.dart' as current_summary; 9 import 'current_summary.dart' as current_summary;
10 import 'find_shard.dart' as find_shard; 10 import 'find_shard.dart' as find_shard;
11 import 'status_summary.dart' as status_summary; 11 import 'status_summary.dart' as status_summary;
12 import 'summary.dart' as summary; 12 import 'summary.dart' as summary;
13 13
14 typedef Future MainFunction(List<String> args); 14 typedef Future MainFunction(List<String> args);
15 15
16 help(List<String> args) async { 16 Future help(List<String> args) async {
17 if (args.length == 1 && args[0] == "--help") { 17 if (args.length == 1 && args[0] == "--help") {
18 print("This help"); 18 print("This help");
19 return null; 19 return null;
20 } 20 }
21 21
22 print("A script that combines multiple commands:\n"); 22 print("A script that combines multiple commands:\n");
23 23
24 for (String command in commands.keys) { 24 for (String command in commands.keys) {
25 print(command); 25 print(command);
26 print('-' * command.length); 26 print('-' * command.length);
(...skipping 16 matching lines...) Expand all
43 await help([]); 43 await help([]);
44 exit(-1); 44 exit(-1);
45 } 45 }
46 var command = commands[args[0]]; 46 var command = commands[args[0]];
47 if (command == null) { 47 if (command == null) {
48 await help([]); 48 await help([]);
49 exit(-1); 49 exit(-1);
50 } 50 }
51 command(args.sublist(1)); 51 command(args.sublist(1));
52 } 52 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698