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

Unified Diff: tools/gardening/bin/shard2group.dart

Issue 2756193002: Script finding the build bot group for a given shard. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gardening/bin/create_shard_groups.dart ('k') | tools/gardening/lib/src/shard_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/bin/shard2group.dart
diff --git a/tools/gardening/bin/shard2group.dart b/tools/gardening/bin/shard2group.dart
new file mode 100644
index 0000000000000000000000000000000000000000..573fa7660a795d25bedef37715267d8040230496
--- /dev/null
+++ b/tools/gardening/bin/shard2group.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Translates a buildbot shard name to the corresponding column group name
+// on the buildbot site, such that it's easier to find the right column.
+//
+// Example: `dart bin/shard2group.dart precomp-linux-debug-x64-be`
+// prints `vm-precomp(5): precomp-linux-debug-x64-be`.
+
+library gardening.shard2group;
+import 'dart:io';
+part 'package:gardening/src/shard_data.dart';
+
+main(List<String> args) async {
+ if (args.length == 0) {
+ print('Usage: dart shard2group.dart <shard-name1> [<shard-name2> ...]');
+ print('Run bin/create_shard_groups.dart to refresh shard data');
+ exit(1);
+ }
+
+ for (String arg in args) {
+ for (String group in shardGroups.keys) {
+ List<String> shardGroup = shardGroups[group];
+ for (int i = 0; i < shardGroup.length; i++) {
+ String shard = shardGroup[i];
+ if (shard.contains(arg)) {
+ print("$group(${i+1}): $shard");
+ }
+ }
+ }
+ }
+}
« no previous file with comments | « tools/gardening/bin/create_shard_groups.dart ('k') | tools/gardening/lib/src/shard_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698