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. |
11 */ | 11 */ |
12 library test_runner; | 12 library test_runner; |
13 | 13 |
14 import "dart:io"; | 14 import "dart:io"; |
15 import "dart:isolate"; | 15 import "dart:isolate"; |
16 import "dart:uri"; | 16 import "dart:uri"; |
17 import "status_file_parser.dart"; | 17 import "status_file_parser.dart"; |
18 import "test_progress.dart"; | 18 import "test_progress.dart"; |
19 import "test_suite.dart"; | 19 import "test_suite.dart"; |
20 | 20 |
21 const int NO_TIMEOUT = 0; | 21 const int NO_TIMEOUT = 0; |
22 const int SLOW_TIMEOUT_MULTIPLIER = 4; | 22 const int SLOW_TIMEOUT_MULTIPLIER = 4; |
| 23 const int SERVER_PORT_ONE = 9876; |
| 24 const int SERVER_PORT_TWO = 5432; |
23 | 25 |
24 typedef void TestCaseEvent(TestCase testCase); | 26 typedef void TestCaseEvent(TestCase testCase); |
25 typedef void ExitCodeEvent(int exitCode); | 27 typedef void ExitCodeEvent(int exitCode); |
26 typedef void EnqueueMoreWork(ProcessQueue queue); | 28 typedef void EnqueueMoreWork(ProcessQueue queue); |
27 | 29 |
28 | 30 |
29 /** | 31 /** |
30 * [areByteArraysEqual] compares a range of bytes from [buffer1] with a | 32 * [areByteArraysEqual] compares a range of bytes from [buffer1] with a |
31 * range of bytes from [buffer2]. | 33 * range of bytes from [buffer2]. |
32 * | 34 * |
(...skipping 1705 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 | 1740 // 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 | 1741 // tests that appear to be broken but were actually just flakes that |
1740 // didn't get retried because there had already been one failure. | 1742 // didn't get retried because there had already been one failure. |
1741 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; | 1743 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; |
1742 new RunningProcess(test, allowRetry, this).start(); | 1744 new RunningProcess(test, allowRetry, this).start(); |
1743 } | 1745 } |
1744 _numProcesses++; | 1746 _numProcesses++; |
1745 } | 1747 } |
1746 } | 1748 } |
1747 } | 1749 } |
OLD | NEW |