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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
936 diagnostics = []; | 936 diagnostics = []; |
937 } | 937 } |
938 | 938 |
939 Expectation result(TestCase testCase) { | 939 Expectation result(TestCase testCase) { |
940 if (hasCrashed) return Expectation.CRASH; | 940 if (hasCrashed) return Expectation.CRASH; |
941 if (hasTimedOut) return Expectation.TIMEOUT; | 941 if (hasTimedOut) return Expectation.TIMEOUT; |
942 return hasFailed(testCase) ? Expectation.FAIL : Expectation.PASS; | 942 return hasFailed(testCase) ? Expectation.FAIL : Expectation.PASS; |
943 } | 943 } |
944 | 944 |
945 bool get hasCrashed { | 945 bool get hasCrashed { |
946 // The Java dartc runner and dart2js exits with code 253 in case | 946 // dart2js exits with code 253 in case of unhandled exceptions. |
947 // of unhandled exceptions. | 947 // The dart binary exits with code 253 in case of an API error such |
948 // as an invalid snapshot file. | |
ricow1
2015/02/05 14:00:42
dart2js exits with code 253 in case of a compiler
Ivan Posva
2015/02/05 14:26:24
Done.
| |
948 if (exitCode == 253) return true; | 949 if (exitCode == 253) return true; |
949 if (io.Platform.operatingSystem == 'windows') { | 950 if (io.Platform.operatingSystem == 'windows') { |
950 // The VM uses std::abort to terminate on asserts. | 951 // The VM uses std::abort to terminate on asserts. |
951 // std::abort terminates with exit code 3 on Windows. | 952 // std::abort terminates with exit code 3 on Windows. |
952 if (exitCode == 3 || exitCode == CRASHING_BROWSER_EXITCODE) { | 953 if (exitCode == 3 || exitCode == CRASHING_BROWSER_EXITCODE) { |
953 return !timedOut; | 954 return !timedOut; |
954 } | 955 } |
955 // If a program receives an uncaught system exception, the program | 956 // If a program receives an uncaught system exception, the program |
956 // terminates with the exception code as exit code. | 957 // terminates with the exception code as exit code. |
957 // The 0x3FFFFF00 mask here tries to determine if an exception indicates | 958 // The 0x3FFFFF00 mask here tries to determine if an exception indicates |
(...skipping 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2953 } | 2954 } |
2954 } | 2955 } |
2955 | 2956 |
2956 void eventAllTestsDone() { | 2957 void eventAllTestsDone() { |
2957 for (var listener in _eventListener) { | 2958 for (var listener in _eventListener) { |
2958 listener.allDone(); | 2959 listener.allDone(); |
2959 } | 2960 } |
2960 _allDone(); | 2961 _allDone(); |
2961 } | 2962 } |
2962 } | 2963 } |
OLD | NEW |