Chromium Code Reviews| Index: tests/standalone/coverage_test.dart |
| =================================================================== |
| --- tests/standalone/coverage_test.dart (revision 23550) |
| +++ tests/standalone/coverage_test.dart (working copy) |
| @@ -32,7 +32,10 @@ |
| void onCoverageExit(exitCode) { |
| var pid = coverageToolProcess.pid; |
| - print("process $pid terminated with exit code $exitCode."); |
| + print("Coverage tool process (pid $pid) terminated with exit code $exitCode."); |
|
ricow1
2013/06/03 19:05:57
long line and I assume that this is for debugging
hausner
2013/06/03 20:48:08
Yes, for debugging. But it doesn't hurt to leave i
ricow1
2013/06/04 05:49:43
Nope, that is perfectly fine, just wanted to make
|
| +} |
| + |
| +void checkSuccess() { |
| if (nextLineToMatch < sourceLines.length) { |
| print("Error: could not match all source code lines of '$targPath'"); |
| exit(-1); |
| @@ -41,6 +44,11 @@ |
| } |
| } |
| +void onStdoutError(err) { |
| + print("Error on coverage tool stdout: err"); |
| + checkSuccess(); |
| +} |
| + |
| void main() { |
| var options = new Options(); |
| @@ -63,7 +71,9 @@ |
| var stdoutStringStream = coverageToolProcess.stdout |
| .transform(new StringDecoder()) |
| .transform(new LineTransformer()); |
| - stdoutStringStream.listen(onCoverageOutput); |
| + stdoutStringStream.listen(onCoverageOutput, |
| + onError: onStdoutError, |
| + onDone: checkSuccess); |
| var stderrStringStream = coverageToolProcess.stderr |
| .transform(new StringDecoder()) |