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

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

Issue 9158011: Fix dartc.sh script to use /bin/bash (issue dart:1104) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix script problem on buildbot (issue dart:1104( Created 8 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
« compiler/scripts/dartc.sh ('K') | « compiler/scripts/dartc.sh ('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 #import("test_suite.dart"); 9 #import("test_suite.dart");
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 arguments, 96 arguments,
97 configuration, 97 configuration,
98 completedHandler, 98 completedHandler,
99 expectedOutcomes, 99 expectedOutcomes,
100 [isNegative = false]) : super(displayName, 100 [isNegative = false]) : super(displayName,
101 executablePath, 101 executablePath,
102 arguments, 102 arguments,
103 configuration, 103 configuration,
104 completedHandler, 104 completedHandler,
105 expectedOutcomes, 105 expectedOutcomes,
106 isNegative); 106 isNegative) {
107 if (compilerPath != null) {
108 commandLine = 'execution command: $commandLine';
109 String compilationCommand =
110 '$compilerPath ${Strings.join(compilerArguments, " ")}';
111 commandLine = 'compilation command: $compilationCommand\n$commandLine';
112 }
113 }
107 } 114 }
108 115
109 116
110 class TestOutput { 117 class TestOutput {
111 // The TestCase this is the output from. 118 // The TestCase this is the output from.
112 TestCase testCase; 119 TestCase testCase;
113 int exitCode; 120 int exitCode;
114 bool timedOut; 121 bool timedOut;
115 bool failed = false; 122 bool failed = false;
116 List<String> stdout; 123 List<String> stdout;
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void exitHandler(int exitCode) { 186 void exitHandler(int exitCode) {
180 new TestOutput(testCase, exitCode, timedOut, stdout, 187 new TestOutput(testCase, exitCode, timedOut, stdout,
181 stderr, new Date.now().difference(startTime)); 188 stderr, new Date.now().difference(startTime));
182 process.close(); 189 process.close();
183 timeoutTimer.cancel(); 190 timeoutTimer.cancel();
184 testCase.completed(); 191 testCase.completed();
185 } 192 }
186 193
187 void compilerExitHandler(int exitCode) { 194 void compilerExitHandler(int exitCode) {
188 if (exitCode != 0) { 195 if (exitCode != 0) {
196 stderr.add('test.dart: Compilation step failed (exit code $exitCode)\n');
189 exitHandler(exitCode); 197 exitHandler(exitCode);
190 } else { 198 } else {
191 process.close(); 199 process.close();
200 stderr.add('test.dart: Compilation finished, starting execution\n');
201 stdout.add('test.dart: Compilation finished, starting execution\n');
192 runCommand(testCase.executablePath, testCase.arguments, exitHandler); 202 runCommand(testCase.executablePath, testCase.arguments, exitHandler);
193 } 203 }
194 } 204 }
195 205
196 Function makeReadHandler(StringInputStream source, List<String> destination) { 206 Function makeReadHandler(StringInputStream source, List<String> destination) {
197 return () { 207 return () {
198 if (source.closed) return; // TODO(whesse): Remove when bug is fixed. 208 if (source.closed) return; // TODO(whesse): Remove when bug is fixed.
199 var line = source.readLine(); 209 var line = source.readLine();
200 while (null != line) { 210 while (null != line) {
201 destination.add(line); 211 destination.add(line);
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 test.displayName != 'dartc/junit_tests') { 494 test.displayName != 'dartc/junit_tests') {
485 _ensureDartcBatchRunnersStarted(test.executablePath); 495 _ensureDartcBatchRunnersStarted(test.executablePath);
486 _getDartcBatchRunnerProcess().startTest(test); 496 _getDartcBatchRunnerProcess().startTest(test);
487 } else { 497 } else {
488 new RunningProcess(test).start(); 498 new RunningProcess(test).start();
489 } 499 }
490 _numProcesses++; 500 _numProcesses++;
491 } 501 }
492 } 502 }
493 } 503 }
OLDNEW
« compiler/scripts/dartc.sh ('K') | « compiler/scripts/dartc.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698