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

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

Issue 12035052: Added a comment to clarify the interpretation of exit codes on windows (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 bool get hasCrashed { 559 bool get hasCrashed {
560 // The Java dartc runner and dart2js exits with code 253 in case 560 // The Java dartc runner and dart2js exits with code 253 in case
561 // of unhandled exceptions. 561 // of unhandled exceptions.
562 if (exitCode == 253) return true; 562 if (exitCode == 253) return true;
563 if (io.Platform.operatingSystem == 'windows') { 563 if (io.Platform.operatingSystem == 'windows') {
564 // The VM uses std::abort to terminate on asserts. 564 // The VM uses std::abort to terminate on asserts.
565 // std::abort terminates with exit code 3 on Windows. 565 // std::abort terminates with exit code 3 on Windows.
566 if (exitCode == 3) { 566 if (exitCode == 3) {
567 return !timedOut; 567 return !timedOut;
568 } 568 }
569 // If a program receives an uncaught system exception, the program
570 // terminates with the exception code as exit code.
571 // The 0x3FFFFF00 mask here tries to determine if an exception indicates
572 // a crash of the program.
573 // System exception codes can be found in 'winnt.h', for example
574 // "#define STATUS_ACCESS_VIOLATION ((DWORD) 0xC0000005)"
569 return (!timedOut && (exitCode < 0) && ((0x3FFFFF00 & exitCode) == 0)); 575 return (!timedOut && (exitCode < 0) && ((0x3FFFFF00 & exitCode) == 0));
570 } 576 }
571 return !timedOut && ((exitCode < 0)); 577 return !timedOut && ((exitCode < 0));
572 } 578 }
573 579
574 bool get hasTimedOut => timedOut; 580 bool get hasTimedOut => timedOut;
575 581
576 bool get didFail { 582 bool get didFail {
577 return (exitCode != 0 && !hasCrashed); 583 return (exitCode != 0 && !hasCrashed);
578 } 584 }
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 // the developer doesn't waste his or her time trying to fix a bunch of 1753 // the developer doesn't waste his or her time trying to fix a bunch of
1748 // tests that appear to be broken but were actually just flakes that 1754 // tests that appear to be broken but were actually just flakes that
1749 // didn't get retried because there had already been one failure. 1755 // didn't get retried because there had already been one failure.
1750 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; 1756 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests;
1751 new RunningProcess(test, allowRetry, this).start(); 1757 new RunningProcess(test, allowRetry, this).start();
1752 } 1758 }
1753 _numProcesses++; 1759 _numProcesses++;
1754 } 1760 }
1755 } 1761 }
1756 } 1762 }
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