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

Unified Diff: tools/gardening/test/buildbot_data_test.dart

Issue 2986223002: Add tests for BuildGroup names (Closed)
Patch Set: Updated cf. comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gardening/lib/src/util.dart ('k') | tools/gardening/test/test_client.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/test/buildbot_data_test.dart
diff --git a/tools/gardening/test/buildbot_data_test.dart b/tools/gardening/test/buildbot_data_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..e02713502c950a80a9783d480c5105a8dbd353e8
--- /dev/null
+++ b/tools/gardening/test/buildbot_data_test.dart
@@ -0,0 +1,48 @@
+// 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.
+
+/// Checks that all active test steps in [buildGroups] can be read from http.
+
+import 'package:args/args.dart';
+import 'package:expect/expect.dart';
+import 'package:gardening/src/buildbot_data.dart';
+import 'package:gardening/src/buildbot_structures.dart';
+import 'package:gardening/src/client.dart';
+import 'package:gardening/src/util.dart';
+
+main(List<String> args) async {
+ ArgParser argParser = createArgParser();
+ ArgResults argResults = argParser.parse(args);
+ processArgResults(argResults);
+ bool useLogdog = argResults['logdog'];
+
+ BuildbotClient client =
+ useLogdog ? new LogdogBuildbotClient() : new HttpBuildbotClient();
+
+ List<String> failingUris = <String>[];
+ for (BuildGroup buildGroup in buildGroups) {
+ for (BuildSubgroup buildSubgroup in buildGroup.subgroups) {
+ if (!useLogdog && !buildSubgroup.isActive) continue;
+ List<BuildUri> buildUris =
+ buildSubgroup.createUris(client.mostRecentBuildNumber);
+ for (BuildUri buildUri in buildUris) {
+ BuildResult result = await client.readResult(buildUri);
+ if (result == null) {
+ failingUris.add('$buildUri');
+ }
+ }
+ }
+ }
+ // TODO(johnniwinther): Find out why these steps cannot be read.
+ Expect.setEquals([
+ '/builders/pkg-mac10.11-release-be/builds/-2/'
+ 'steps/third_party/pkg_tested unit tests',
+ '/builders/pkg-linux-release-be/builds/-2/steps/'
+ 'third_party/pkg_tested unit tests',
+ '/builders/pkg-win7-release-be/builds/-2/steps/'
+ 'third_party/pkg_tested unit tests',
+ ], failingUris, "Unexpected failing buildbot uris: $failingUris");
+
+ client.close();
+}
« no previous file with comments | « tools/gardening/lib/src/util.dart ('k') | tools/gardening/test/test_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698