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

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

Issue 8506013: Correct the sign of exit codes for the process library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. 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 | « runtime/bin/process_win.cc ('k') | 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) 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 7
8 #import("status_file_parser.dart"); 8 #import("status_file_parser.dart");
9 9
10 /** 10 /**
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 TestOutput(this.testCase, this.exitCode, this.timedOut, this.stdout, 77 TestOutput(this.testCase, this.exitCode, this.timedOut, this.stdout,
78 this.stderr, this.time) { 78 this.stderr, this.time) {
79 testCase.output = this; 79 testCase.output = this;
80 } 80 }
81 81
82 String get result() => 82 String get result() =>
83 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); 83 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS));
84 84
85 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); 85 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result);
86 86
87 bool get hasCrashed() => !timedOut && exitCode != 255 && exitCode != 0; 87 bool get hasCrashed() => !timedOut && exitCode != -1 && exitCode != 0;
88 88
89 bool get hasTimedOut() => timedOut; 89 bool get hasTimedOut() => timedOut;
90 90
91 bool get didFail() => exitCode != 0 && !hasCrashed; 91 bool get didFail() => exitCode != 0 && !hasCrashed;
92 92
93 // Reverse result of a negative test. 93 // Reverse result of a negative test.
94 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); 94 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail);
95 } 95 }
96 96
97 97
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 new RunningProcess(test, 60).start(); 182 new RunningProcess(test, 60).start();
183 numProcesses++; 183 numProcesses++;
184 } 184 }
185 } 185 }
186 186
187 runTest(TestCase test) { 187 runTest(TestCase test) {
188 tests.add(test); 188 tests.add(test);
189 tryRunTest(); 189 tryRunTest();
190 } 190 }
191 } 191 }
OLDNEW
« no previous file with comments | « runtime/bin/process_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698