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

Unified Diff: tools/testing/dart/test_runner.dart

Issue 10566026: Test infrastructure: Remove "race condition" bug from restarting batch process runners. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_runner.dart
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index b5e125cd055a02c55726ddc7b17e5f86726e895e..e2853c79c0fe9428bf6935d216747df739520e59 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -735,6 +735,13 @@ class BatchRunnerProcess {
_stderrStream.onLine = _readStderr(_stderrStream, _testStderr);
_timer = new Timer(testCase.timeout * 1000, _timeoutHandler);
var line = _createArgumentsLine(testCase.batchTestArguments);
+ _process.stdin.onError = (err) {
+ print('Error on batch runner input stream stdin');
+ print(' Input line: $line');
+ print(' Previous test\'s status: $_status');
+ print(' Error: $err');
+ throw err;
+ };
_process.stdin.write(line.charCodes());
}
@@ -845,12 +852,12 @@ class BatchRunnerProcess {
_startProcess(() { _reportResult(); });
} else { // No active test case running.
_process.close();
- _startProcess(() { });
+ _process = null;
}
};
- }
+ }
- void _timeoutHandler(ignore) {
+ void _timeoutHandler(ignore) {
_process.onExit = makeExitHandler(">>> TEST TIMEOUT");
_process.kill();
}
« 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