| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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_runner"); | 5 #library("test_runner"); |
| 6 | 6 |
| 7 #import("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
| 8 #import("test_progress.dart"); | 8 #import("test_progress.dart"); |
| 9 #import("test_suite.dart"); | 9 #import("test_suite.dart"); |
| 10 | 10 |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 } | 319 } |
| 320 | 320 |
| 321 void _testListerDone() { | 321 void _testListerDone() { |
| 322 _activeTestListers--; | 322 _activeTestListers--; |
| 323 _checkDone(); | 323 _checkDone(); |
| 324 } | 324 } |
| 325 | 325 |
| 326 void _checkDone() { | 326 void _checkDone() { |
| 327 // When there are no more active test listers ask for more work | 327 // When there are no more active test listers ask for more work |
| 328 // from process queue users. | 328 // from process queue users. |
| 329 if (_activeTestListers == 0 && | 329 if (_activeTestListers == 0 && !_enqueueMoreWork(this)) { |
| 330 !_enqueueMoreWork(this) && | 330 _progress.allTestsKnown(); |
| 331 _tests.isEmpty() && | 331 if (_tests.isEmpty() && _numProcesses == 0) { |
| 332 _numProcesses == 0) { | 332 _terminateDartcBatchRunners(); |
| 333 _terminateDartcBatchRunners(); | 333 _progress.allDone(); |
| 334 _progress.allDone(); | 334 } |
| 335 } | 335 } |
| 336 } | 336 } |
| 337 | 337 |
| 338 void _runTest(TestCase test) { | 338 void _runTest(TestCase test) { |
| 339 _progress.testAdded(); | 339 _progress.testAdded(); |
| 340 _tests.add(test); | 340 _tests.add(test); |
| 341 _tryRunTest(); | 341 _tryRunTest(); |
| 342 } | 342 } |
| 343 | 343 |
| 344 void _terminateDartcBatchRunners() { | 344 void _terminateDartcBatchRunners() { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 if (test.executablePath.contains('compiler')) { | 377 if (test.executablePath.contains('compiler')) { |
| 378 _ensureDartcBatchRunnersStarted(test.executablePath); | 378 _ensureDartcBatchRunnersStarted(test.executablePath); |
| 379 _getDartcBatchRunnerProcess().startTest(test); | 379 _getDartcBatchRunnerProcess().startTest(test); |
| 380 } else { | 380 } else { |
| 381 new RunningProcess(test).start(); | 381 new RunningProcess(test).start(); |
| 382 } | 382 } |
| 383 _numProcesses++; | 383 _numProcesses++; |
| 384 } | 384 } |
| 385 } | 385 } |
| 386 } | 386 } |
| OLD | NEW |