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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 _executable = testCase.commands.last.executable; | 782 _executable = testCase.commands.last.executable; |
783 _batchArguments = testCase.batchRunnerArguments; | 783 _batchArguments = testCase.batchRunnerArguments; |
784 _isWebDriver = testCase.usesWebDriver; | 784 _isWebDriver = testCase.usesWebDriver; |
785 } | 785 } |
786 | 786 |
787 bool get active => _currentTest != null; | 787 bool get active => _currentTest != null; |
788 | 788 |
789 void startTest(TestCase testCase) { | 789 void startTest(TestCase testCase) { |
790 Expect.isNull(_currentTest); | 790 Expect.isNull(_currentTest); |
791 _currentTest = testCase; | 791 _currentTest = testCase; |
792 if (_process === null) { | 792 if (_process == null) { |
793 // Start process if not yet started. | 793 // Start process if not yet started. |
794 _executable = testCase.commands.last.executable; | 794 _executable = testCase.commands.last.executable; |
795 _startProcess(() { | 795 _startProcess(() { |
796 doStartTest(testCase); | 796 doStartTest(testCase); |
797 }); | 797 }); |
798 } else if (testCase.commands.last.executable != _executable) { | 798 } else if (testCase.commands.last.executable != _executable) { |
799 // Restart this runner with the right executable for this test | 799 // Restart this runner with the right executable for this test |
800 // if needed. | 800 // if needed. |
801 _executable = testCase.commands.last.executable; | 801 _executable = testCase.commands.last.executable; |
802 _batchArguments = testCase.batchRunnerArguments; | 802 _batchArguments = testCase.batchRunnerArguments; |
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1330 // the developer doesn't waste his or her time trying to fix a bunch of | 1330 // the developer doesn't waste his or her time trying to fix a bunch of |
1331 // tests that appear to be broken but were actually just flakes that | 1331 // tests that appear to be broken but were actually just flakes that |
1332 // didn't get retried because there had already been one failure. | 1332 // didn't get retried because there had already been one failure. |
1333 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1333 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
1334 new RunningProcess(test, allowRetry, this).start(); | 1334 new RunningProcess(test, allowRetry, this).start(); |
1335 } | 1335 } |
1336 _numProcesses++; | 1336 _numProcesses++; |
1337 } | 1337 } |
1338 } | 1338 } |
1339 } | 1339 } |
OLD | NEW |