Chromium Code Reviews| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 this.stderr, this.time) { | 121 this.stderr, this.time) { |
| 122 testCase.output = this; | 122 testCase.output = this; |
| 123 } | 123 } |
| 124 | 124 |
| 125 String get result() => | 125 String get result() => |
| 126 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); | 126 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); |
| 127 | 127 |
| 128 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); | 128 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); |
| 129 | 129 |
| 130 bool get hasCrashed() { | 130 bool get hasCrashed() { |
| 131 print('exit code: $exitCode'); | |
|
Bill Hesse
2011/12/29 18:32:24
Remove this line.
Bill Hesse
2011/12/30 16:04:33
Done.
| |
| 131 if (new Platform().operatingSystem() == 'windows') { | 132 if (new Platform().operatingSystem() == 'windows') { |
| 132 // The VM uses std::abort to terminate on asserts. | 133 // The VM uses std::abort to terminate on asserts. |
| 133 // std::abort terminates with exit code 3 on Windows. | 134 // std::abort terminates with exit code 3 on Windows. |
| 134 if (exitCode == 3) { | 135 if (exitCode == 3) { |
| 135 return !timedOut; | 136 return !timedOut; |
| 136 } | 137 } |
| 137 return (!timedOut && (exitCode < 0) && ((0x3FFFFF00 & exitCode) == 0)); | 138 return (!timedOut && (exitCode < 0) && ((0x3FFFFF00 & exitCode) == 0)); |
| 138 } | 139 } |
| 139 // The Java dartc runner exits with code 253 in case of unhandled | 140 // The Java dartc runner exits with code 253 in case of unhandled |
| 140 // exceptions. | 141 // exceptions. |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 465 if (_verbose) print(test.commandLine); | 466 if (_verbose) print(test.commandLine); |
| 466 _progress.start(test); | 467 _progress.start(test); |
| 467 Function oldCallback = test.completedHandler; | 468 Function oldCallback = test.completedHandler; |
| 468 Function wrapper = (TestCase test_arg) { | 469 Function wrapper = (TestCase test_arg) { |
| 469 _numProcesses--; | 470 _numProcesses--; |
| 470 _progress.done(test_arg); | 471 _progress.done(test_arg); |
| 471 _tryRunTest(); | 472 _tryRunTest(); |
| 472 oldCallback(test_arg); | 473 oldCallback(test_arg); |
| 473 }; | 474 }; |
| 474 test.completedHandler = wrapper; | 475 test.completedHandler = wrapper; |
| 475 if (test.configuration['component'] == 'dartc') { | 476 if (test.configuration['component'] == 'dartc' && |
| 477 test.displayName != 'dartc/junit_tests') { | |
| 476 _ensureDartcBatchRunnersStarted(test.executablePath); | 478 _ensureDartcBatchRunnersStarted(test.executablePath); |
| 477 _getDartcBatchRunnerProcess().startTest(test); | 479 _getDartcBatchRunnerProcess().startTest(test); |
| 478 } else { | 480 } else { |
| 479 new RunningProcess(test).start(); | 481 new RunningProcess(test).start(); |
| 480 } | 482 } |
| 481 _numProcesses++; | 483 _numProcesses++; |
| 482 } | 484 } |
| 483 } | 485 } |
| 484 } | 486 } |
| OLD | NEW |