| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 import 'util.dart'; | 7 import 'util.dart'; |
| 8 | 8 |
| 9 import 'buildbot_structures.dart'; | 9 import 'buildbot_structures.dart'; |
| 10 import 'cache.dart'; | 10 import 'cache.dart'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 return result; | 27 return result; |
| 28 } else { | 28 } else { |
| 29 return parseTestStepResult( | 29 return parseTestStepResult( |
| 30 buildUri, await cache.read(buildUri.logdogPath, read)); | 30 buildUri, await cache.read(buildUri.logdogPath, read)); |
| 31 } | 31 } |
| 32 } | 32 } |
| 33 | 33 |
| 34 /// Fetches test data for [buildUri] through the buildbot stdio. | 34 /// Fetches test data for [buildUri] through the buildbot stdio. |
| 35 Future<BuildResult> readBuildResultFromHttp( | 35 Future<BuildResult> readBuildResultFromHttp( |
| 36 HttpClient client, BuildUri buildUri) async { | 36 HttpClient client, BuildUri buildUri) { |
| 37 Future<String> read() async { | 37 Future<String> read() async { |
| 38 Uri uri = buildUri.toUri(); | 38 Uri uri = buildUri.toUri(); |
| 39 log('Reading buildbot results: $uri'); | 39 log('Reading buildbot results: $uri'); |
| 40 return await readUriAsText(client, uri); | 40 return readUriAsText(client, uri); |
| 41 } | 41 } |
| 42 | 42 |
| 43 return _readBuildResult(buildUri, read); | 43 return _readBuildResult(buildUri, read); |
| 44 } | 44 } |
| 45 | 45 |
| 46 /// Fetches test data for [buildUri] through logdog. | 46 /// Fetches test data for [buildUri] through logdog. |
| 47 /// | 47 /// |
| 48 /// The build number of [buildUri] most be non-negative. | 48 /// The build number of [buildUri] most be non-negative. |
| 49 Future<BuildResult> readBuildResultFromLogDog(BuildUri buildUri) { | 49 Future<BuildResult> readBuildResultFromLogDog(BuildUri buildUri) { |
| 50 Future<String> read() async { | 50 Future<String> read() async { |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 String archName = name.substring(0, slashPos); | 132 String archName = name.substring(0, slashPos); |
| 133 String testName = name.substring(slashPos + 1); | 133 String testName = name.substring(slashPos + 1); |
| 134 timings.add(new Timing( | 134 timings.add(new Timing( |
| 135 uri, | 135 uri, |
| 136 time, | 136 time, |
| 137 new TestStep( | 137 new TestStep( |
| 138 stepName, new TestConfiguration(configName, archName, testName)))); | 138 stepName, new TestConfiguration(configName, archName, testName)))); |
| 139 } | 139 } |
| 140 return timings; | 140 return timings; |
| 141 } | 141 } |
| OLD | NEW |