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

Side by Side Diff: tools/gardening/test/buildbot_data_test.dart

Issue 2986223002: Add tests for BuildGroup names (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
(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/precomp-linux-debug-x64-be/builds/-2/steps/vm tests',
40 '/builders/pkg-mac10.11-release-be/builds/-2/'
41 'steps/third_party/pkg_tested unit tests',
42 '/builders/pkg-linux-release-be/builds/-2/steps/'
43 'third_party/pkg_tested unit tests',
44 '/builders/pkg-win7-release-be/builds/-2/steps/'
45 'third_party/pkg_tested unit tests',
46 ], failingUris);
47
48 client.close();
49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698