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 1654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1665 } | 1665 } |
1666 } | 1666 } |
1667 return Futures.wait(futures); | 1667 return Futures.wait(futures); |
1668 } | 1668 } |
1669 | 1669 |
1670 BatchRunnerProcess _getBatchRunner(TestCase test) { | 1670 BatchRunnerProcess _getBatchRunner(TestCase test) { |
1671 // Start batch processes if needed | 1671 // Start batch processes if needed |
1672 var compiler = test.configuration['compiler']; | 1672 var compiler = test.configuration['compiler']; |
1673 var runners = _batchProcesses[compiler]; | 1673 var runners = _batchProcesses[compiler]; |
1674 if (runners == null) { | 1674 if (runners == null) { |
1675 runners = new List<BatchRunnerProcess>(_maxProcesses); | 1675 runners = new List<BatchRunnerProcess>.fixedLength(_maxProcesses); |
1676 for (int i = 0; i < _maxProcesses; i++) { | 1676 for (int i = 0; i < _maxProcesses; i++) { |
1677 runners[i] = new BatchRunnerProcess(test); | 1677 runners[i] = new BatchRunnerProcess(test); |
1678 } | 1678 } |
1679 _batchProcesses[compiler] = runners; | 1679 _batchProcesses[compiler] = runners; |
1680 } | 1680 } |
1681 | 1681 |
1682 for (var runner in runners) { | 1682 for (var runner in runners) { |
1683 if (!runner.active) return runner; | 1683 if (!runner.active) return runner; |
1684 } | 1684 } |
1685 throw new Exception('Unable to find inactive batch runner.'); | 1685 throw new Exception('Unable to find inactive batch runner.'); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1738 // the developer doesn't waste his or her time trying to fix a bunch of | 1738 // the developer doesn't waste his or her time trying to fix a bunch of |
1739 // tests that appear to be broken but were actually just flakes that | 1739 // tests that appear to be broken but were actually just flakes that |
1740 // didn't get retried because there had already been one failure. | 1740 // didn't get retried because there had already been one failure. |
1741 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1741 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
1742 new RunningProcess(test, allowRetry, this).start(); | 1742 new RunningProcess(test, allowRetry, this).start(); |
1743 } | 1743 } |
1744 _numProcesses++; | 1744 _numProcesses++; |
1745 } | 1745 } |
1746 } | 1746 } |
1747 } | 1747 } |
OLD | NEW |