| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library test_configurations; | 5 library test_configurations; |
| 6 | 6 |
| 7 import "dart:async"; | 7 import "dart:async"; |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import "dart:math" as math; | 9 import "dart:math" as math; |
| 10 | 10 |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 void allTestsFinished() { | 217 void allTestsFinished() { |
| 218 for (var conf in configurations) { | 218 for (var conf in configurations) { |
| 219 if (conf.containsKey('_servers_')) { | 219 if (conf.containsKey('_servers_')) { |
| 220 conf['_servers_'].stopServers(); | 220 conf['_servers_'].stopServers(); |
| 221 } | 221 } |
| 222 } | 222 } |
| 223 DebugLogger.close(); | 223 DebugLogger.close(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 var eventListener = []; | 226 var eventListener = []; |
| 227 if (progressIndicator != 'silent') { | 227 |
| 228 // We don't print progress if we list tests. |
| 229 if (progressIndicator != 'silent' && !listTests) { |
| 228 var printFailures = true; | 230 var printFailures = true; |
| 229 var formatter = new Formatter(); | 231 var formatter = new Formatter(); |
| 230 if (progressIndicator == 'color') { | 232 if (progressIndicator == 'color') { |
| 231 progressIndicator = 'compact'; | 233 progressIndicator = 'compact'; |
| 232 formatter = new ColorFormatter(); | 234 formatter = new ColorFormatter(); |
| 233 } | 235 } |
| 234 if (progressIndicator == 'diff') { | 236 if (progressIndicator == 'diff') { |
| 235 progressIndicator = 'compact'; | 237 progressIndicator = 'compact'; |
| 236 formatter = new ColorFormatter(); | 238 formatter = new ColorFormatter(); |
| 237 printFailures = false; | 239 printFailures = false; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 254 eventListener.add(new SkippedCompilationsPrinter()); | 256 eventListener.add(new SkippedCompilationsPrinter()); |
| 255 eventListener.add(new LeftOverTempDirPrinter()); | 257 eventListener.add(new LeftOverTempDirPrinter()); |
| 256 } | 258 } |
| 257 if (firstConf['write_test_outcome_log']) { | 259 if (firstConf['write_test_outcome_log']) { |
| 258 eventListener.add(new TestOutcomeLogWriter()); | 260 eventListener.add(new TestOutcomeLogWriter()); |
| 259 } | 261 } |
| 260 if (firstConf['copy_coredumps']) { | 262 if (firstConf['copy_coredumps']) { |
| 261 eventListener.add(new UnexpectedCrashDumpArchiver()); | 263 eventListener.add(new UnexpectedCrashDumpArchiver()); |
| 262 } | 264 } |
| 263 | 265 |
| 264 eventListener.add(new ExitCodeSetter()); | 266 // The only progress indicator when listing tests should be the |
| 267 // the summary printer. |
| 268 if (listTests) { |
| 269 eventListener.add(new SummaryPrinter()); |
| 270 } else { |
| 271 eventListener.add(new ExitCodeSetter()); |
| 272 } |
| 265 | 273 |
| 266 void startProcessQueue() { | 274 void startProcessQueue() { |
| 267 // [firstConf] is needed here, since the ProcessQueue needs to know the | 275 // [firstConf] is needed here, since the ProcessQueue needs to know the |
| 268 // settings of 'noBatch' and 'local_ip' | 276 // settings of 'noBatch' and 'local_ip' |
| 269 new ProcessQueue(firstConf, | 277 new ProcessQueue(firstConf, |
| 270 maxProcesses, | 278 maxProcesses, |
| 271 maxBrowserProcesses, | 279 maxBrowserProcesses, |
| 272 startTime, | 280 startTime, |
| 273 testSuites, | 281 testSuites, |
| 274 eventListener, | 282 eventListener, |
| 275 allTestsFinished, | 283 allTestsFinished, |
| 276 verbose, | 284 verbose, |
| 277 recordingPath, | 285 recordingPath, |
| 278 recordingOutputPath); | 286 recordingOutputPath); |
| 279 } | 287 } |
| 280 | 288 |
| 281 // Start all the HTTP servers required before starting the process queue. | 289 // Start all the HTTP servers required before starting the process queue. |
| 282 if (serverFutures.isEmpty) { | 290 if (serverFutures.isEmpty) { |
| 283 startProcessQueue(); | 291 startProcessQueue(); |
| 284 } else { | 292 } else { |
| 285 Future.wait(serverFutures).then((_) => startProcessQueue()); | 293 Future.wait(serverFutures).then((_) => startProcessQueue()); |
| 286 } | 294 } |
| 287 } | 295 } |
| OLD | NEW |