Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 8636012: Make Dart test scripts work for the VM on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 #library("test_runner"); 5 #library("test_runner");
6 6
7 #import("status_file_parser.dart"); 7 #import("status_file_parser.dart");
8 #import("test_progress.dart"); 8 #import("test_progress.dart");
9 9
10 /** 10 /**
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 testCase.output = this; 64 testCase.output = this;
65 } 65 }
66 66
67 String get result() => 67 String get result() =>
68 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); 68 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS));
69 69
70 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); 70 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result);
71 71
72 // The Java dartc runner exits with code 253 in case of unhandles 72 // The Java dartc runner exits with code 253 in case of unhandles
73 // exceptions. 73 // exceptions.
74 bool get hasCrashed() => 74 // The VM uses std::abort to terminate on asserts.
75 !timedOut && (exitCode != -1) && ((exitCode < 0) || (exitCode == 253)); 75 // std::abort terminates with exit code 3 on Windows.
76 bool get hasCrashed() {
77 if (new Platform().operatingSystem() == 'windows') {
78 if (exitCode == 3) {
79 return !timedOut;
80 }
81 return (!timedOut &&
82 (exitCode != -1) &&
83 (exitCode < 0) &&
84 ((0x3FFFFF00 & exitCode) == 0));
85 }
86 return (!timedOut &&
87 (exitCode != -1) &&
88 ((exitCode < 0) || (exitCode == 253)));
89 }
76 90
77 bool get hasTimedOut() => timedOut; 91 bool get hasTimedOut() => timedOut;
78 92
79 bool get didFail() => exitCode != 0 && !hasCrashed; 93 bool get didFail() => exitCode != 0 && !hasCrashed;
80 94
81 // Reverse result of a negative test. 95 // Reverse result of a negative test.
82 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); 96 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail);
83 } 97 }
84 98
85 99
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 numProcesses++; 192 numProcesses++;
179 } 193 }
180 } 194 }
181 195
182 runTest(TestCase test) { 196 runTest(TestCase test) {
183 progress.testAdded(); 197 progress.testAdded();
184 tests.add(test); 198 tests.add(test);
185 tryRunTest(); 199 tryRunTest();
186 } 200 }
187 } 201 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698