| Index: tools/testing/dart/test_runner.dart
|
| diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
|
| index 8e1363af458b18cbacf6c02dc3e0b04bd0c7093b..a396abdd4d27832a1f19ac159a413cd97b3a103d 100644
|
| --- a/tools/testing/dart/test_runner.dart
|
| +++ b/tools/testing/dart/test_runner.dart
|
| @@ -2155,6 +2155,10 @@ class TestCaseCompleter {
|
| // (i.e. before state changes in the graph)
|
| commandQueue.completedCommands.listen((CommandOutput output) {
|
| _outputs[output.command] = output;
|
| + }, onDone: () {
|
| + _completeTestCasesIfPossible(new List.from(enqueuer.remainingTestCases));
|
| + assert(enqueuer.remainingTestCases.isEmpty);
|
| + _checkDone();
|
| });
|
|
|
| // Listen for NodeState.Processing -> NodeState.{Successfull,Failed}
|
| @@ -2162,15 +2166,13 @@ class TestCaseCompleter {
|
| eventCondition((event) => event is dgraph.StateChangedEvent)
|
| .listen((dgraph.StateChangedEvent event) {
|
| if (event.from == dgraph.NodeState.Processing) {
|
| + var command = event.node.userData;
|
| +
|
| assert(COMPLETED_STATES.contains(event.to));
|
| - _completeTestCasesIfPossible(event.node.userData);
|
| + assert(_outputs[command] != null);
|
|
|
| - if (!_closed &&
|
| - graph.isSealed &&
|
| - enqueuer.remainingTestCases.isEmpty) {
|
| - _controller.close();
|
| - _closed = true;
|
| - }
|
| + _completeTestCasesIfPossible(enqueuer.command2testCases[command]);
|
| + _checkDone();
|
| }
|
| });
|
|
|
| @@ -2187,11 +2189,14 @@ class TestCaseCompleter {
|
|
|
| Stream<TestCase> get finishedTestCases => _controller.stream;
|
|
|
| - void _completeTestCasesIfPossible(Command command) {
|
| - assert(_outputs[command] != null);
|
| -
|
| - var testCases = enqueuer.command2testCases[command];
|
| + void _checkDone() {
|
| + if (!_closed && graph.isSealed && enqueuer.remainingTestCases.isEmpty) {
|
| + _controller.close();
|
| + _closed = true;
|
| + }
|
| + }
|
|
|
| + void _completeTestCasesIfPossible(Iterable<TestCase> testCases){
|
| // Update TestCases with command outputs
|
| for (TestCase test in testCases) {
|
| for (var icommand in test.commands) {
|
|
|