Index: tools/gardening/bin/current_summary.dart |
diff --git a/tools/gardening/bin/current_summary.dart b/tools/gardening/bin/current_summary.dart |
index 78e813b59677beddb4b3c8645470c806c154ac3f..4155071bedbef4a3a9e59630df5219fb5dcb73bb 100644 |
--- a/tools/gardening/bin/current_summary.dart |
+++ b/tools/gardening/bin/current_summary.dart |
@@ -15,12 +15,18 @@ import 'package:args/args.dart'; |
import 'package:gardening/src/buildbot_data.dart'; |
import 'package:gardening/src/buildbot_loading.dart'; |
import 'package:gardening/src/buildbot_structures.dart'; |
+import 'package:gardening/src/client.dart'; |
import 'package:gardening/src/util.dart'; |
main(List<String> args) async { |
ArgParser argParser = createArgParser(); |
ArgResults argResults = argParser.parse(args); |
processArgResults(argResults); |
+ |
+ BuildbotClient client = argResults['logdog'] |
+ ? new LogdogBuildbotClient() |
+ : new HttpBuildbotClient(); |
+ |
if (argResults.rest.length == 0) { |
print('Usage: current_summary [options] <test-name1> [<test-name2> ...]'); |
print('where options are:'); |
@@ -30,15 +36,14 @@ main(List<String> args) async { |
int maxStatusWidth = 0; |
int maxConfigWidth = 0; |
- HttpClient client = new HttpClient(); |
Map<String, Map<BuildUri, TestStatus>> resultMap = |
<String, Map<BuildUri, TestStatus>>{}; |
for (BuildGroup group in buildGroups) { |
// TODO(johnniwinther): Support reading a partially completed shard, i.e. |
// use build number `-1`. |
- for (BuildUri buildUri in group.createUris(-2)) { |
+ for (BuildUri buildUri in group.createUris(client.mostRecentBuildNumber)) { |
print('Reading $buildUri'); |
- BuildResult buildResult = await readBuildResult(client, buildUri); |
+ BuildResult buildResult = await client.readResult(buildUri); |
for (TestStatus testStatus in buildResult.results) { |
String testName = testStatus.config.testName; |
for (String arg in argResults.rest) { |