| 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 /** | 5 /** |
| 6 * Classes and methods for executing tests. | 6 * Classes and methods for executing tests. |
| 7 * | 7 * |
| 8 * This module includes: | 8 * This module includes: |
| 9 * - Managing parallel execution of tests, including timeout checks. | 9 * - Managing parallel execution of tests, including timeout checks. |
| 10 * - Evaluating the output of each test as pass/fail/crash/timeout. | 10 * - Evaluating the output of each test as pass/fail/crash/timeout. |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 for (String line in stdout) { | 206 for (String line in stdout) { |
| 207 if (line == 'PASS' && previous_line == 'Content-Type: text/plain') { | 207 if (line == 'PASS' && previous_line == 'Content-Type: text/plain') { |
| 208 return (exitCode != 0 && !hasCrashed); | 208 return (exitCode != 0 && !hasCrashed); |
| 209 } | 209 } |
| 210 previous_line = line; | 210 previous_line = line; |
| 211 } | 211 } |
| 212 | 212 |
| 213 // If the browser test failed, it may have been because DumpRenderTree | 213 // If the browser test failed, it may have been because DumpRenderTree |
| 214 // and the virtual framebuffer X server didn't hook up. | 214 // and the virtual framebuffer X server didn't hook up. |
| 215 for (String line in stderr) { | 215 for (String line in stderr) { |
| 216 if (line.contains('Gtk-WARNING **: cannot open display: :99')) { | 216 if (line.contains('Gtk-WARNING **: cannot open display: :99') || |
| 217 // If we get the X server error, return the expected value | 217 line.contains('Failed to run command. return code=1')) { |
| 218 // We cannot restart the test from here. Issue dart:1135 is filed. | 218 // If we get the X server error, or DRT crashes with a core dump, retry |
| 219 // the test. |
| 219 requestRetry = true; | 220 requestRetry = true; |
| 220 return true; | 221 return true; |
| 221 } | 222 } |
| 222 } | 223 } |
| 223 return true; | 224 return true; |
| 224 } | 225 } |
| 225 | 226 |
| 226 // Reverse result of a negative test. | 227 // Reverse result of a negative test. |
| 227 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); | 228 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); |
| 228 } | 229 } |
| (...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 701 test.displayName != 'dartc/junit_tests') { | 702 test.displayName != 'dartc/junit_tests') { |
| 702 _ensureDartcBatchRunnersStarted(test.executablePath); | 703 _ensureDartcBatchRunnersStarted(test.executablePath); |
| 703 _getDartcBatchRunnerProcess().startTest(test); | 704 _getDartcBatchRunnerProcess().startTest(test); |
| 704 } else { | 705 } else { |
| 705 new RunningProcess(test).start(); | 706 new RunningProcess(test).start(); |
| 706 } | 707 } |
| 707 _numProcesses++; | 708 _numProcesses++; |
| 708 } | 709 } |
| 709 } | 710 } |
| 710 } | 711 } |
| OLD | NEW |