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

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

Issue 2990363002: Include passing tests in BuildResult.results (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
« no previous file with comments | « tools/gardening/lib/src/compare_failures_impl.dart ('k') | no next file » | 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 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 }
OLDNEW
« no previous file with comments | « tools/gardening/lib/src/compare_failures_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698