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

Side by Side Diff: tools/testing/dart/test_runner.dart

Issue 22160002: Check if we're done after the dependency graph was sealed (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 /** 5 /**
6 * Classes and methods for executing tests. 6 * Classes and methods for executing tests.
7 * 7 *
8 * This module includes: 8 * This module includes:
9 * - Managing parallel execution of tests, including timeout checks. 9 * - Managing parallel execution of tests, including timeout checks.
10 * - Evaluating the output of each test as pass/fail/crash/timeout. 10 * - Evaluating the output of each test as pass/fail/crash/timeout.
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 .listen((event) { 1599 .listen((event) {
1600 if (event.to == dgraph.NodeState.Enqueuing) { 1600 if (event.to == dgraph.NodeState.Enqueuing) {
1601 assert(event.from == dgraph.NodeState.Initialized || 1601 assert(event.from == dgraph.NodeState.Initialized ||
1602 event.from == dgraph.NodeState.Waiting); 1602 event.from == dgraph.NodeState.Waiting);
1603 graph.changeState(event.node, dgraph.NodeState.Processing); 1603 graph.changeState(event.node, dgraph.NodeState.Processing);
1604 var command = event.node.userData; 1604 var command = event.node.userData;
1605 _runQueue.add(command); 1605 _runQueue.add(command);
1606 Timer.run(() => _tryRunNextCommand()); 1606 Timer.run(() => _tryRunNextCommand());
1607 } 1607 }
1608 }); 1608 });
1609 eventCondition((event) => event is dgraph.GraphSealedEvent).listen((_) {
1610 _checkDone();
1611 });
1609 } 1612 }
1610 1613
1611 Stream<CommandOutput> get completedCommands => _commandOutputStream.stream; 1614 Stream<CommandOutput> get completedCommands => _commandOutputStream.stream;
1612 1615
1613 Future get done => _completer.future; 1616 Future get done => _completer.future;
1614 1617
1615 void _tryRunNextCommand() { 1618 void _tryRunNextCommand() {
1616 _checkDone(); 1619 _checkDone();
1617 1620
1618 if (_numProcesses < _maxProcesses && !_runQueue.isEmpty) { 1621 if (_numProcesses < _maxProcesses && !_runQueue.isEmpty) {
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2054 } 2057 }
2055 } 2058 }
2056 2059
2057 void eventAllTestsDone() { 2060 void eventAllTestsDone() {
2058 for (var listener in _eventListener) { 2061 for (var listener in _eventListener) {
2059 listener.allDone(); 2062 listener.allDone();
2060 } 2063 }
2061 _allDone(); 2064 _allDone();
2062 } 2065 }
2063 } 2066 }
OLDNEW
« 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