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 import 'package:args/args.dart'; |
| 6 import 'package:expect/expect.dart'; |
| 7 import 'package:gardening/src/buildbot_structures.dart'; |
| 8 import 'package:gardening/src/util.dart'; |
| 9 |
| 10 import 'test_client.dart'; |
| 11 |
| 12 // TODO(johnniwinther): Use 'package:testing' to run all tests. |
| 13 main(List<String> args) async { |
| 14 ArgParser argParser = createArgParser(); |
| 15 argParser.addFlag('force', abbr: 'f'); |
| 16 ArgResults argResults = argParser.parse(args); |
| 17 processArgResults(argResults); |
| 18 |
| 19 TestClient client = new TestClient(force: argResults['force']); |
| 20 BuildUri buildUri = |
| 21 new BuildUri.fromUrl('https://build.chromium.org/p/client.dart/builders/' |
| 22 'vm-kernel-linux-debug-x64-be/builds/1884/steps/' |
| 23 'vm%20tests/logs/stdio'); |
| 24 BuildResult result = await client.readResult(buildUri); |
| 25 |
| 26 void checkTest(String testName, String expectedStatus) { |
| 27 TestStatus status; |
| 28 for (TestStatus s in result.results) { |
| 29 if (s.config.testName == testName) { |
| 30 status = s; |
| 31 break; |
| 32 } |
| 33 } |
| 34 Expect.isNotNull(status, "TestStatus for '$testName' not found."); |
| 35 Expect.equals( |
| 36 expectedStatus, status.status, "Unexpected status for '$testName'."); |
| 37 } |
| 38 |
| 39 checkTest('corelib/list_growable_test', 'pass'); |
| 40 checkTest('corelib_2/map_keys2_test', 'fail'); |
| 41 client.close(); |
| 42 } |
OLD | NEW |