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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gardening/lib/src/compare_failures_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gardening/test/parse_build_results_test.dart
diff --git a/tools/gardening/test/parse_build_results_test.dart b/tools/gardening/test/parse_build_results_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..2d5ef3c03dbf7e2456ce8f365b1998fa03917dd9
--- /dev/null
+++ b/tools/gardening/test/parse_build_results_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:args/args.dart';
+import 'package:expect/expect.dart';
+import 'package:gardening/src/buildbot_structures.dart';
+import 'package:gardening/src/util.dart';
+
+import 'test_client.dart';
+
+// TODO(johnniwinther): Use 'package:testing' to run all tests.
+main(List<String> args) async {
+ ArgParser argParser = createArgParser();
+ argParser.addFlag('force', abbr: 'f');
+ ArgResults argResults = argParser.parse(args);
+ processArgResults(argResults);
+
+ TestClient client = new TestClient(force: argResults['force']);
+ BuildUri buildUri =
+ new BuildUri.fromUrl('https://build.chromium.org/p/client.dart/builders/'
+ 'vm-kernel-linux-debug-x64-be/builds/1884/steps/'
+ 'vm%20tests/logs/stdio');
+ BuildResult result = await client.readResult(buildUri);
+
+ void checkTest(String testName, String expectedStatus) {
+ TestStatus status;
+ for (TestStatus s in result.results) {
+ if (s.config.testName == testName) {
+ status = s;
+ break;
+ }
+ }
+ Expect.isNotNull(status, "TestStatus for '$testName' not found.");
+ Expect.equals(
+ expectedStatus, status.status, "Unexpected status for '$testName'.");
+ }
+
+ checkTest('corelib/list_growable_test', 'pass');
+ checkTest('corelib_2/map_keys2_test', 'fail');
+ client.close();
+}
« 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