OLD | NEW |
1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
2 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 // Translates a buildbot shard name to the corresponding column group name | 6 // Translates a buildbot shard name to the corresponding column group name |
7 // on the buildbot site, such that it's easier to find the right column. | 7 // on the buildbot site, such that it's easier to find the right column. |
8 // | 8 // |
9 // Example: `bin/find_shard.dart precomp-linux-debug-x64-be` | 9 // Example: `bin/find_shard.dart precomp-linux-debug-x64-be` |
10 // prints `vm-precomp(5): precomp-linux-debug-x64-be`. | 10 // prints `vm-precomp(5): precomp-linux-debug-x64-be`. |
11 | 11 |
12 import 'dart:io'; | 12 import 'dart:io'; |
13 import 'package:args/args.dart'; | 13 import 'package:args/args.dart'; |
14 part 'package:gardening/src/shard_data.dart'; | 14 import 'package:gardening/src/shard_data.dart'; |
15 | 15 |
16 ArgParser createArgParser() { | 16 ArgParser createArgParser() { |
17 ArgParser argParser = new ArgParser(allowTrailingOptions: true); | 17 ArgParser argParser = new ArgParser(allowTrailingOptions: true); |
18 argParser.addFlag('help', help: "Help"); | 18 argParser.addFlag('help', help: "Help"); |
19 return argParser; | 19 return argParser; |
20 } | 20 } |
21 | 21 |
22 bool INCLUDE_DEV = | 22 bool INCLUDE_DEV = |
23 const bool.fromEnvironment('INCLUDE_DEV', defaultValue: false); | 23 const bool.fromEnvironment('INCLUDE_DEV', defaultValue: false); |
24 bool INCLUDE_STABLE = | 24 bool INCLUDE_STABLE = |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 for (String group in shardGroups.keys) { | 89 for (String group in shardGroups.keys) { |
90 List<String> shardGroup = shardGroups[group]; | 90 List<String> shardGroup = shardGroups[group]; |
91 for (int i = 0; i < shardGroup.length; i++) { | 91 for (int i = 0; i < shardGroup.length; i++) { |
92 String shard = shardGroup[i]; | 92 String shard = shardGroup[i]; |
93 if (shard_enabled(shard) && shard.contains(arg)) { | 93 if (shard_enabled(shard) && shard.contains(arg)) { |
94 print("$group(${i+1}): $shard"); | 94 print("$group(${i+1}): $shard"); |
95 } | 95 } |
96 } | 96 } |
97 } | 97 } |
98 } | 98 } |
OLD | NEW |