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

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

Issue 9564005: Speculative fix for webdriver test issues. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 24856855c8c2d94de8e0a373220c63026995f2f4..650cdcf6507e41a0bcd0b08a8e3eacba8974f488 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -390,6 +390,7 @@ class BatchRunnerProcess {
TestCase _currentTest;
List<String> _testStdout;
List<String> _testStderr;
+ bool _stdoutDrained = false;
bool _stderrDrained = false;
Date _startTime;
Timer _timer;
@@ -455,6 +456,7 @@ class BatchRunnerProcess {
_startTime = new Date.now();
_testStdout = new List<String>();
_testStderr = new List<String>();
+ _stdoutDrained = false;
_stderrDrained = false;
_stdoutStream.onLine = _readStdout(_stdoutStream, _testStdout);
_stderrStream.onLine = _readStderr(_stderrStream, _testStderr);
@@ -474,6 +476,7 @@ class BatchRunnerProcess {
}
int _reportResult(String output) {
+ _stdoutDrained = true;
// output = '>>> TEST {PASS, FAIL, OK, CRASH, FAIL, TIMEOUT}'
var outcome = output.split(" ")[2];
var exitCode = 0;
@@ -488,7 +491,7 @@ class BatchRunnerProcess {
void _stderrDone() {
_stderrDrained = true;
// Move on when both stdout and stderr has been drained.
- if (_currentTest.output != null) _testCompleted();
+ if (_stdoutDrained) _testCompleted();
}
Function _readStdout(StringInputStream stream, List<String> buffer) {
@@ -555,6 +558,7 @@ class BatchRunnerProcess {
_stderrStream = new StringInputStream(_process.stderr);
_testStdout = new List<String>();
_testStderr = new List<String>();
+ _stdoutDrained = false;
_stderrDrained = false;
_stdoutStream.onLine = _readStdout(_stdoutStream, _testStdout);
_stderrStream.onLine = _readStderr(_stderrStream, _testStderr);
« 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