OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 library rasta.run_batch; | 5 library rasta.run_batch; |
6 | 6 |
7 import 'dart:async' show | 7 import 'dart:async' show |
8 Future, | 8 Future, |
9 Stream; | 9 Stream; |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 ? readTestsFromStream(inputFile.openRead()) | 78 ? readTestsFromStream(inputFile.openRead()) |
79 : listTests(<Uri>[testUri], pattern: globalOptions.pattern); | 79 : listTests(<Uri>[testUri], pattern: globalOptions.pattern); |
80 } | 80 } |
81 | 81 |
82 await for (TestDescription description in tests) { | 82 await for (TestDescription description in tests) { |
83 assert(kernel.isInternalStateConsistent); | 83 assert(kernel.isInternalStateConsistent); |
84 count++; | 84 count++; |
85 | 85 |
86 int failuresBefore = compiler.elementsWithCompileTimeErrors.length; | 86 int failuresBefore = compiler.elementsWithCompileTimeErrors.length; |
87 Uri output = description.output; | 87 Uri output = description.output; |
88 output ??= description.uri.resolve("${description.uri.path}.bart"); | 88 output ??= description.uri.resolve("${description.uri.path}.dill"); |
89 | 89 |
90 Options options = new Options( | 90 Options options = new Options( |
91 description.uri, | 91 description.uri, |
92 output, | 92 output, |
93 dependenciesFile: null, | 93 dependenciesFile: null, |
94 generateLibrary: globalOptions.generateLibrary, | 94 generateLibrary: globalOptions.generateLibrary, |
95 isVerbose: globalOptions.isVerbose || batchFromStdin, | 95 isVerbose: globalOptions.isVerbose || batchFromStdin, |
96 isBatch: false, | 96 isBatch: false, |
97 pattern: null); | 97 pattern: null); |
98 | 98 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 Failures: ${failures.length} | 149 Failures: ${failures.length} |
150 Average time per test: ${averageTimeMs}ms | 150 Average time per test: ${averageTimeMs}ms |
151 Success rate: ${(100 - failures.length * 100/count).toStringAsFixed(2)}%"""); | 151 Success rate: ${(100 - failures.length * 100/count).toStringAsFixed(2)}%"""); |
152 } | 152 } |
153 } | 153 } |
154 | 154 |
155 String padTo(int i, int pad) { | 155 String padTo(int i, int pad) { |
156 String result = (" " * pad) + "$i"; | 156 String result = (" " * pad) + "$i"; |
157 return result.substring(result.length - pad); | 157 return result.substring(result.length - pad); |
158 } | 158 } |
OLD | NEW |