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

Unified Diff: tests/standalone/coverage_test.dart

Issue 16305013: Fix coverage test (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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: 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())
« 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