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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// Checks that all active test steps in [buildGroups] can be read from http.
6
7 import 'package:args/args.dart';
8 import 'package:expect/expect.dart';
9 import 'package:gardening/src/buildbot_data.dart';
10 import 'package:gardening/src/buildbot_structures.dart';
11 import 'package:gardening/src/client.dart';
12 import 'package:gardening/src/util.dart';
13
14 main(List<String> args) async {
15 ArgParser argParser = createArgParser();
16 ArgResults argResults = argParser.parse(args);
17 processArgResults(argResults);
18 bool useLogdog = argResults['logdog'];
19
20 BuildbotClient client =
21 useLogdog ? new LogdogBuildbotClient() : new HttpBuildbotClient();
22
23 List<String> failingUris = <String>[];
24 for (BuildGroup buildGroup in buildGroups) {
25 for (BuildSubgroup buildSubgroup in buildGroup.subgroups) {
26 if (!useLogdog && !buildSubgroup.isActive) continue;
27 List<BuildUri> buildUris =
28 buildSubgroup.createUris(client.mostRecentBuildNumber);
29 for (BuildUri buildUri in buildUris) {
30 BuildResult result = await client.readResult(buildUri);
31 if (result == null) {
32 failingUris.add('$buildUri');
33 }
34 }
35 }
36 }
37 // TODO(johnniwinther): Find out why these steps cannot be read.
38 Expect.setEquals([
39 '/builders/pkg-mac10.11-release-be/builds/-2/'
40 'steps/third_party/pkg_tested unit tests',
41 '/builders/pkg-linux-release-be/builds/-2/steps/'
42 'third_party/pkg_tested unit tests',
43 '/builders/pkg-win7-release-be/builds/-2/steps/'
44 'third_party/pkg_tested unit tests',
45 ], failingUris, "Unexpected failing buildbot uris: $failingUris");
46
47 client.close();
48 }
OLDNEW
« 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