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

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

Issue 22326004: test.py: Fix in CommandQueue to make sure we finish up correctly if an intermediate command failed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 e09d153bf2e98ad1791f394863e4b35901301f66..dd0f2f0de40a177cd7eebd65dfaaa593eced3b7d 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -1573,8 +1573,6 @@ class CommandEnqueuer {
}
}
-// TODO(kustermann): Add support for '--list' and '--verbose'!
-
/*
* [CommandQueue] will listen for nodes entering the NodeState.ENQUEUING state,
* queue them up and run them. While nodes are processed they will be in the
@@ -1622,8 +1620,18 @@ class CommandQueue {
Timer.run(() => _tryRunNextCommand());
}
});
- eventCondition((event) => event is dgraph.GraphSealedEvent).listen((_) {
- _checkDone();
+ // We're finished if the graph is sealed and all nodes are in a finished
+ // state (Successfull, Failed or UnableToRun).
+ // So we're calling '_checkDone()' to check whether that condition is met
+ // and we can cleanup.
+ graph.events.listen((dgraph.GraphEvent event) {
+ if (event is dgraph.GraphSealedEvent) {
+ _checkDone();
+ } else if (event is dgraph.StateChangedEvent) {
+ if (event.to == dgraph.NodeState.UnableToRun) {
+ _checkDone();
+ }
+ }
});
}
@@ -1979,7 +1987,6 @@ class TestCaseCompleter {
}
-
class ProcessQueue {
Map _globalConfiguration;
« 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