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

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

Issue 11878039: Fix in testing scripts, decodeUtf8->encodeUtf8 (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 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after
1313 // Otherwise, process output and call _reportResult() when done. 1313 // Otherwise, process output and call _reportResult() when done.
1314 var line = stream.readLine(); 1314 var line = stream.readLine();
1315 while (line != null) { 1315 while (line != null) {
1316 if (line.startsWith('>>> TEST')) { 1316 if (line.startsWith('>>> TEST')) {
1317 _status = line; 1317 _status = line;
1318 } else if (line.startsWith('>>> BATCH START')) { 1318 } else if (line.startsWith('>>> BATCH START')) {
1319 // ignore 1319 // ignore
1320 } else if (line.startsWith('>>> ')) { 1320 } else if (line.startsWith('>>> ')) {
1321 throw new Exception('Unexpected command from dartc batch runner.'); 1321 throw new Exception('Unexpected command from dartc batch runner.');
1322 } else { 1322 } else {
1323 buffer.addAll(decodeUtf8(line)); 1323 buffer.addAll(encodeUtf8(line));
1324 buffer.addAll("\n".charCodes); 1324 buffer.addAll("\n".charCodes);
1325 } 1325 }
1326 line = stream.readLine(); 1326 line = stream.readLine();
1327 } 1327 }
1328 if (_status != null) { 1328 if (_status != null) {
1329 _timer.cancel(); 1329 _timer.cancel();
1330 _stdoutDone(); 1330 _stdoutDone();
1331 } 1331 }
1332 } 1332 }
1333 stream.onLine = onLineHandler; 1333 stream.onLine = onLineHandler;
1334 } 1334 }
1335 1335
1336 void _readStderr(io.StringInputStream stream, List<int> buffer) { 1336 void _readStderr(io.StringInputStream stream, List<int> buffer) {
1337 var ignoreStreams = _ignoreStreams; // Capture this mutable object. 1337 var ignoreStreams = _ignoreStreams; // Capture this mutable object.
1338 void onLineHandler() { 1338 void onLineHandler() {
1339 if (ignoreStreams.value) { 1339 if (ignoreStreams.value) {
1340 while (stream.readLine() != null) { 1340 while (stream.readLine() != null) {
1341 // Do nothing. 1341 // Do nothing.
1342 } 1342 }
1343 return; 1343 return;
1344 } 1344 }
1345 // Otherwise, process output and call _reportResult() when done. 1345 // Otherwise, process output and call _reportResult() when done.
1346 var line = stream.readLine(); 1346 var line = stream.readLine();
1347 while (line != null) { 1347 while (line != null) {
1348 if (line.startsWith('>>> EOF STDERR')) { 1348 if (line.startsWith('>>> EOF STDERR')) {
1349 _stderrDone(); 1349 _stderrDone();
1350 } else { 1350 } else {
1351 buffer.addAll(decodeUtf8(line)); 1351 buffer.addAll(encodeUtf8(line));
1352 buffer.addAll("\n".charCodes); 1352 buffer.addAll("\n".charCodes);
1353 } 1353 }
1354 line = stream.readLine(); 1354 line = stream.readLine();
1355 } 1355 }
1356 } 1356 }
1357 stream.onLine = onLineHandler; 1357 stream.onLine = onLineHandler;
1358 } 1358 }
1359 1359
1360 ExitCodeEvent makeExitHandler(String status) { 1360 ExitCodeEvent makeExitHandler(String status) {
1361 void handler(int exitCode) { 1361 void handler(int exitCode) {
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 // the developer doesn't waste his or her time trying to fix a bunch of 1751 // the developer doesn't waste his or her time trying to fix a bunch of
1752 // tests that appear to be broken but were actually just flakes that 1752 // tests that appear to be broken but were actually just flakes that
1753 // didn't get retried because there had already been one failure. 1753 // didn't get retried because there had already been one failure.
1754 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests; 1754 bool allowRetry = _MAX_FAILED_NO_RETRY > _progress.numFailedTests;
1755 new RunningProcess(test, allowRetry, this).start(); 1755 new RunningProcess(test, allowRetry, this).start();
1756 } 1756 }
1757 _numProcesses++; 1757 _numProcesses++;
1758 } 1758 }
1759 } 1759 }
1760 } 1760 }
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