| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 String get result(); | 180 String get result(); |
| 181 | 181 |
| 182 bool get unexpectedOutput(); | 182 bool get unexpectedOutput(); |
| 183 | 183 |
| 184 bool get hasCrashed(); | 184 bool get hasCrashed(); |
| 185 | 185 |
| 186 bool get hasTimedOut(); | 186 bool get hasTimedOut(); |
| 187 | 187 |
| 188 bool get didFail(); | 188 bool get didFail(); |
| 189 | 189 |
| 190 Duration get time(); | 190 Duration get time(); |
| 191 | 191 |
| 192 List<String> get stdout(); | 192 List<String> get stdout(); |
| 193 | 193 |
| 194 List<String> get stderr(); | 194 List<String> get stderr(); |
| 195 | 195 |
| 196 List<String> get diagnostics(); | 196 List<String> get diagnostics(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 class TestOutputImpl implements TestOutput { | 199 class TestOutputImpl implements TestOutput { |
| 200 TestCase testCase; | 200 TestCase testCase; |
| 201 int exitCode; | 201 int exitCode; |
| 202 bool timedOut; | 202 bool timedOut; |
| 203 bool failed = false; | 203 bool failed = false; |
| 204 List<String> stdout; | 204 List<String> stdout; |
| 205 List<String> stderr; | 205 List<String> stderr; |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 bool _startingServer = false; | 833 bool _startingServer = false; |
| 834 | 834 |
| 835 /** True if we find that there is already a selenium jar running. */ | 835 /** True if we find that there is already a selenium jar running. */ |
| 836 bool _seleniumAlreadyRunning = false; | 836 bool _seleniumAlreadyRunning = false; |
| 837 | 837 |
| 838 ProcessQueue(int this._maxProcesses, | 838 ProcessQueue(int this._maxProcesses, |
| 839 String progress, | 839 String progress, |
| 840 Date startTime, | 840 Date startTime, |
| 841 bool printTiming, | 841 bool printTiming, |
| 842 Function this._enqueueMoreWork, | 842 Function this._enqueueMoreWork, |
| 843 [bool this._verbose = false, | 843 [bool verbose = false, |
| 844 bool this._listTests = false, | 844 bool listTests = false, |
| 845 bool this._keepGeneratedTests = false]) | 845 bool keepGeneratedTests = false]) |
| 846 : _tests = new Queue<TestCase>(), | 846 : _verbose = verbose, |
| 847 _listTests = listTests, |
| 848 _keepGeneratedTests = keepGeneratedTests, |
| 849 _tests = new Queue<TestCase>(), |
| 847 _progress = new ProgressIndicator.fromName(progress, | 850 _progress = new ProgressIndicator.fromName(progress, |
| 848 startTime, | 851 startTime, |
| 849 printTiming), | 852 printTiming), |
| 850 _batchProcesses = new Map<String, List<BatchRunnerProcess>>(), | 853 _batchProcesses = new Map<String, List<BatchRunnerProcess>>(), |
| 851 _testCache = new Map<String, List<TestInformation>>() { | 854 _testCache = new Map<String, List<TestInformation>>() { |
| 852 if (!_enqueueMoreWork(this)) _progress.allDone(); | 855 if (!_enqueueMoreWork(this)) _progress.allDone(); |
| 853 } | 856 } |
| 854 | 857 |
| 855 /** | 858 /** |
| 856 * Registers a TestSuite so that all of its tests will be run. | 859 * Registers a TestSuite so that all of its tests will be run. |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 // the developer doesn't waste his or her time trying to fix a bunch of | 1111 // the developer doesn't waste his or her time trying to fix a bunch of |
| 1109 // tests that appear to be broken but were actually just flakes that | 1112 // tests that appear to be broken but were actually just flakes that |
| 1110 // didn't get retried because there had already been one failure. | 1113 // didn't get retried because there had already been one failure. |
| 1111 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1114 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
| 1112 new RunningProcess(test, allowRetry, this).start(); | 1115 new RunningProcess(test, allowRetry, this).start(); |
| 1113 } | 1116 } |
| 1114 _numProcesses++; | 1117 _numProcesses++; |
| 1115 } | 1118 } |
| 1116 } | 1119 } |
| 1117 } | 1120 } |
| OLD | NEW |