OLD | NEW |
(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 } |
OLD | NEW |