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

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

Issue 22387002: Add dependent commands at the front of the run queue to make the progress indicator more linear. (Closed) Base URL: http://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 1590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1601 CommandQueue(this.graph, this.enqueuer, this.executor, 1601 CommandQueue(this.graph, this.enqueuer, this.executor,
1602 this._maxProcesses, this._maxBrowserProcesses, this._verbose) { 1602 this._maxProcesses, this._maxBrowserProcesses, this._verbose) {
1603 var eventCondition = graph.events.where; 1603 var eventCondition = graph.events.where;
1604 eventCondition((event) => event is dgraph.StateChangedEvent) 1604 eventCondition((event) => event is dgraph.StateChangedEvent)
1605 .listen((event) { 1605 .listen((event) {
1606 if (event.to == dgraph.NodeState.Enqueuing) { 1606 if (event.to == dgraph.NodeState.Enqueuing) {
1607 assert(event.from == dgraph.NodeState.Initialized || 1607 assert(event.from == dgraph.NodeState.Initialized ||
1608 event.from == dgraph.NodeState.Waiting); 1608 event.from == dgraph.NodeState.Waiting);
1609 graph.changeState(event.node, dgraph.NodeState.Processing); 1609 graph.changeState(event.node, dgraph.NodeState.Processing);
1610 var command = event.node.userData; 1610 var command = event.node.userData;
1611 _runQueue.add(command); 1611 if (event.node.dependencies.length > 0) {
1612 _runQueue.addFirst(command);
1613 } else {
1614 _runQueue.add(command);
1615 }
1612 Timer.run(() => _tryRunNextCommand()); 1616 Timer.run(() => _tryRunNextCommand());
1613 } 1617 }
1614 }); 1618 });
1615 eventCondition((event) => event is dgraph.GraphSealedEvent).listen((_) { 1619 eventCondition((event) => event is dgraph.GraphSealedEvent).listen((_) {
1616 _checkDone(); 1620 _checkDone();
1617 }); 1621 });
1618 } 1622 }
1619 1623
1620 Stream<CommandOutput> get completedCommands => _commandOutputStream.stream; 1624 Stream<CommandOutput> get completedCommands => _commandOutputStream.stream;
1621 1625
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 } 2067 }
2064 } 2068 }
2065 2069
2066 void eventAllTestsDone() { 2070 void eventAllTestsDone() {
2067 for (var listener in _eventListener) { 2071 for (var listener in _eventListener) {
2068 listener.allDone(); 2072 listener.allDone();
2069 } 2073 }
2070 _allDone(); 2074 _allDone();
2071 } 2075 }
2072 } 2076 }
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