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

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

Issue 8588028: Use the right command for dartc. (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_config_utils.dart ('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 #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 19 matching lines...) Expand all
30 buildDir += configuration['architecture'] + '/'; 30 buildDir += configuration['architecture'] + '/';
31 return buildDir; 31 return buildDir;
32 } 32 }
33 33
34 34
35 String getExecutableName(Map configuration) { 35 String getExecutableName(Map configuration) {
36 switch (configuration['component']) { 36 switch (configuration['component']) {
37 case 'vm': 37 case 'vm':
38 return 'dart_bin'; 38 return 'dart_bin';
39 case 'dartc': 39 case 'dartc':
40 return 'dartc'; 40 return 'compiler/bin/dartc_test';
41 case 'frog': 41 case 'frog':
42 case 'leg': 42 case 'leg':
43 return 'frog/bin/frog'; 43 return 'frog/bin/frog';
44 case 'frogsh': 44 case 'frogsh':
45 return 'frog/bin/frogsh'; 45 return 'frog/bin/frogsh';
46 default: 46 default:
47 throw "Unknown executable for: ${configuration['component']}"; 47 throw "Unknown executable for: ${configuration['component']}";
48 } 48 }
49 } 49 }
50 50
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 TestOutput(this.testCase, this.exitCode, this.timedOut, this.stdout, 102 TestOutput(this.testCase, this.exitCode, this.timedOut, this.stdout,
103 this.stderr, this.time) { 103 this.stderr, this.time) {
104 testCase.output = this; 104 testCase.output = this;
105 } 105 }
106 106
107 String get result() => 107 String get result() =>
108 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS)); 108 hasCrashed ? CRASH : (hasTimedOut ? TIMEOUT : (hasFailed ? FAIL : PASS));
109 109
110 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result); 110 bool get unexpectedOutput() => !testCase.expectedOutcomes.contains(result);
111 111
112 bool get hasCrashed() => !timedOut && exitCode != -1 && exitCode < 0; 112 // The Java dartc runner exits with code 253 in case of unhandles
113 // exceptions.
114 bool get hasCrashed() =>
115 !timedOut && (exitCode != -1) && ((exitCode < 0) || (exitCode == 253));
113 116
114 bool get hasTimedOut() => timedOut; 117 bool get hasTimedOut() => timedOut;
115 118
116 bool get didFail() => exitCode != 0 && !hasCrashed; 119 bool get didFail() => exitCode != 0 && !hasCrashed;
117 120
118 // Reverse result of a negative test. 121 // Reverse result of a negative test.
119 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail); 122 bool get hasFailed() => (testCase.isNegative ? !didFail : didFail);
120 } 123 }
121 124
122 125
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 numProcesses++; 216 numProcesses++;
214 } 217 }
215 } 218 }
216 219
217 runTest(TestCase test) { 220 runTest(TestCase test) {
218 progress.testAdded(); 221 progress.testAdded();
219 tests.add(test); 222 tests.add(test);
220 tryRunTest(); 223 tryRunTest();
221 } 224 }
222 } 225 }
OLDNEW
« no previous file with comments | « tools/testing/dart/test_config_utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698