blob: f40e593500231383807b82274482cf5c8bd0a120 [file] [log] [blame]
// 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';
main(List<String> args) async {
ArgParser argParser = createArgParser();
argParser.addFlag('force', abbr: 'f');
ArgResults argResults = argParser.parse(args);
TestClient client = new TestClient(force: argResults['force']);
BuildUri buildUri =
new BuildUri.fromUrl(''
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;
Expect.isNotNull(status, "TestStatus for '$testName' not found.");
expectedStatus, status.status, "Unexpected status for '$testName'.");
checkTest('corelib/list_growable_test', 'pass');
checkTest('corelib_2/map_keys2_test', 'fail');