| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 * treats all but the last command as compilation steps. The last command is | 504 * treats all but the last command as compilation steps. The last command is |
| 505 * the actual test and its output is analyzed in [testComplete]. | 505 * the actual test and its output is analyzed in [testComplete]. |
| 506 */ | 506 */ |
| 507 void stepExitHandler(int exitCode) { | 507 void stepExitHandler(int exitCode) { |
| 508 process.close(); | 508 process.close(); |
| 509 int totalSteps = testCase.commands.length; | 509 int totalSteps = testCase.commands.length; |
| 510 String suffix =' (step $currentStep of $totalSteps)'; | 510 String suffix =' (step $currentStep of $totalSteps)'; |
| 511 if (currentStep == totalSteps) { // done with test command | 511 if (currentStep == totalSteps) { // done with test command |
| 512 testComplete(exitCode); | 512 testComplete(exitCode); |
| 513 } else if (exitCode != 0) { | 513 } else if (exitCode != 0) { |
| 514 stderr.add('test.dart: Compilation failed$suffix, exit code $exitCode\n'); | |
| 515 testComplete(exitCode); | 514 testComplete(exitCode); |
| 516 } else { | 515 } else { |
| 517 stderr.add('test.dart: Compilion finished $suffix\n'); | 516 stderr.add('test.dart: Compilion finished $suffix\n'); |
| 518 stdout.add('test.dart: Compilion finished $suffix\n'); | 517 stdout.add('test.dart: Compilion finished $suffix\n'); |
| 519 if (currentStep == totalSteps - 1 && testCase.usesWebDriver && | 518 if (currentStep == totalSteps - 1 && testCase.usesWebDriver && |
| 520 !testCase.configuration['noBatch']) { | 519 !testCase.configuration['noBatch']) { |
| 521 // Note: processQueue will always be non-null for component == webdriver | 520 // Note: processQueue will always be non-null for component == webdriver |
| 522 // (It is only null for component == vm) | 521 // (It is only null for component == vm) |
| 523 processQueue._getBatchRunner(testCase).startTest(testCase); | 522 processQueue._getBatchRunner(testCase).startTest(testCase); |
| 524 } else { | 523 } else { |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1126 // the developer doesn't waste his or her time trying to fix a bunch of | 1125 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1127 // tests that appear to be broken but were actually just flakes that | 1126 // tests that appear to be broken but were actually just flakes that |
| 1128 // didn't get retried because there had already been one failure. | 1127 // didn't get retried because there had already been one failure. |
| 1129 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1128 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1130 new RunningProcess(test, allowRetry, this).start(); | 1129 new RunningProcess(test, allowRetry, this).start(); |
| 1131 } | 1130 } |
| 1132 _numProcesses++; | 1131 _numProcesses++; |
| 1133 } | 1132 } |
| 1134 } | 1133 } |
| 1135 } | 1134 } |
| OLD | NEW |