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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 _executable = testCase.commands.last.executable; | 771 _executable = testCase.commands.last.executable; |
772 _batchArguments = testCase.batchRunnerArguments; | 772 _batchArguments = testCase.batchRunnerArguments; |
773 _isWebDriver = testCase.usesWebDriver; | 773 _isWebDriver = testCase.usesWebDriver; |
774 } | 774 } |
775 | 775 |
776 bool get active => _currentTest != null; | 776 bool get active => _currentTest != null; |
777 | 777 |
778 void startTest(TestCase testCase) { | 778 void startTest(TestCase testCase) { |
779 Expect.isNull(_currentTest); | 779 Expect.isNull(_currentTest); |
780 _currentTest = testCase; | 780 _currentTest = testCase; |
781 if (_process === null) { | 781 if (_process == null) { |
782 // Start process if not yet started. | 782 // Start process if not yet started. |
783 _executable = testCase.commands.last.executable; | 783 _executable = testCase.commands.last.executable; |
784 _startProcess(() { | 784 _startProcess(() { |
785 doStartTest(testCase); | 785 doStartTest(testCase); |
786 }); | 786 }); |
787 } else if (testCase.commands.last.executable != _executable) { | 787 } else if (testCase.commands.last.executable != _executable) { |
788 // Restart this runner with the right executable for this test | 788 // Restart this runner with the right executable for this test |
789 // if needed. | 789 // if needed. |
790 _executable = testCase.commands.last.executable; | 790 _executable = testCase.commands.last.executable; |
791 _batchArguments = testCase.batchRunnerArguments; | 791 _batchArguments = testCase.batchRunnerArguments; |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 // the developer doesn't waste his or her time trying to fix a bunch of | 1319 // the developer doesn't waste his or her time trying to fix a bunch of |
1320 // tests that appear to be broken but were actually just flakes that | 1320 // tests that appear to be broken but were actually just flakes that |
1321 // didn't get retried because there had already been one failure. | 1321 // didn't get retried because there had already been one failure. |
1322 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1322 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
1323 new RunningProcess(test, allowRetry, this).start(); | 1323 new RunningProcess(test, allowRetry, this).start(); |
1324 } | 1324 } |
1325 _numProcesses++; | 1325 _numProcesses++; |
1326 } | 1326 } |
1327 } | 1327 } |
1328 } | 1328 } |
OLD | NEW |