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 'util.dart'; | 5 import 'util.dart'; |
6 | 6 |
7 /// The [Uri] of a build step stdio log split into its subparts. | 7 /// The [Uri] of a build step stdio log split into its subparts. |
8 class BuildUri { | 8 class BuildUri { |
9 final String botName; | 9 final String botName; |
10 final int buildNumber; | 10 final int buildNumber; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 class BuildResult { | 100 class BuildResult { |
101 final BuildUri buildUri; | 101 final BuildUri buildUri; |
102 | 102 |
103 /// The absolute build number, if found. | 103 /// The absolute build number, if found. |
104 /// | 104 /// |
105 /// The [buildUri] can be created with a relative build number, such as `-2` | 105 /// The [buildUri] can be created with a relative build number, such as `-2` |
106 /// which means the second-to-last build. The absolute build number, a | 106 /// which means the second-to-last build. The absolute build number, a |
107 /// positive number, is read from the build results. | 107 /// positive number, is read from the build results. |
108 final int buildNumber; | 108 final int buildNumber; |
109 | 109 |
| 110 final String buildRevision; |
| 111 |
110 final List<TestStatus> _results; | 112 final List<TestStatus> _results; |
111 final List<TestFailure> _failures; | 113 final List<TestFailure> _failures; |
112 final List<Timing> _timings; | 114 final List<Timing> _timings; |
113 | 115 |
114 BuildResult(this.buildUri, this.buildNumber, this._results, this._failures, | 116 BuildResult(this.buildUri, this.buildNumber, this.buildRevision, |
115 this._timings); | 117 this._results, this._failures, this._timings); |
116 | 118 |
117 /// `true` of the build result has test failures. | 119 /// `true` of the build result has test failures. |
118 bool get hasFailures => _failures.isNotEmpty; | 120 bool get hasFailures => _failures.isNotEmpty; |
119 | 121 |
120 /// Returns the top-20 timings found in the build log. | 122 /// Returns the top-20 timings found in the build log. |
121 Iterable<Timing> get timings => _timings; | 123 Iterable<Timing> get timings => _timings; |
122 | 124 |
123 /// Returns the [TestStatus] for all tests. | 125 /// Returns the [TestStatus] for all tests. |
124 Iterable<TestStatus> get results => _results; | 126 Iterable<TestStatus> get results => _results; |
125 | 127 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 | 220 |
219 /// The result of a single test for a single test step. | 221 /// The result of a single test for a single test step. |
220 class TestStatus { | 222 class TestStatus { |
221 final TestConfiguration config; | 223 final TestConfiguration config; |
222 final String status; | 224 final String status; |
223 | 225 |
224 TestStatus(this.config, this.status); | 226 TestStatus(this.config, this.status); |
225 | 227 |
226 String toString() => '$config: $status'; | 228 String toString() => '$config: $status'; |
227 } | 229 } |
OLD | NEW |