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

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

Issue 10079015: changes to suppress vm failures in windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 months 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 | « no previous file | no next file » | 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) 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 stdout, stderr, time); 246 stdout, stderr, time);
247 } 247 }
248 248
249 String get result() => 249 String get result() =>
250 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); 250 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS));
251 251
252 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); 252 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result);
253 253
254 bool get hasCrashed() { 254 bool get hasCrashed() {
255 if (new Platform().operatingSystem() == 'windows') { 255 if (new Platform().operatingSystem() == 'windows') {
256 if (exitCode != 0) {
257 // Suppress some flaky errors that crash the VM.
258 // TODO(sigmund,efortuna): remove this when bug 2124 gets fixed.
259 for (String line in testCase.output.stdout) {
260 if (line.startsWith('Kind:')) {
261 if (!alreadyPrintedWarning) {
262 print("WARNING: VM crashed: $line, exit code: $exitCode. "
263 " This is a fake pass!!");
264 alreadyPrintedWarning = true;
265 }
266 return false;
267 }
268 }
269 }
270
256 // The VM uses std::abort to terminate on asserts. 271 // The VM uses std::abort to terminate on asserts.
257 // std::abort terminates with exit code 3 on Windows. 272 // std::abort terminates with exit code 3 on Windows.
258 if (exitCode == 3) { 273 if (exitCode == 3) {
259 return !timedOut; 274 return !timedOut;
260 } 275 }
261 return (!timedOut && (exitCode < 0) && ((0x3FFFFF00 & exitCode) == 0)); 276 return (!timedOut && (exitCode < 0) && ((0x3FFFFF00 & exitCode) == 0));
262 } 277 }
263 // The Java dartc runner exits with code 253 in case of unhandled 278 // The Java dartc runner exits with code 253 in case of unhandled
264 // exceptions. 279 // exceptions.
265 return (!timedOut && ((exitCode < 0) || (exitCode == 253))); 280 return (!timedOut && ((exitCode < 0) || (exitCode == 253)));
(...skipping 877 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 // the developer doesn't waste his or her time trying to fix a bunch of 1158 // the developer doesn't waste his or her time trying to fix a bunch of
1144 // tests that appear to be broken but were actually just flakes that 1159 // tests that appear to be broken but were actually just flakes that
1145 // didn't get retried because there had already been one failure. 1160 // didn't get retried because there had already been one failure.
1146 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; 1161 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests;
1147 new RunningProcess(test, allowRetry, this).start(); 1162 new RunningProcess(test, allowRetry, this).start();
1148 } 1163 }
1149 _numProcesses++; 1164 _numProcesses++;
1150 } 1165 }
1151 } 1166 }
1152 } 1167 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698