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

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

Issue 8523009: Implement 'compact' progress indicator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup Created 9 years, 1 month 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 | « tools/testing/dart/test_progress.dart ('k') | 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 9dd56f6e8a9c9759a158cded206be429817ba7d0..c36e80991b2c6e0a9daad41efb4167b46b9ad575 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -4,8 +4,8 @@
#library("test_runner");
-
#import("status_file_parser.dart");
+#import("test_progress.dart");
/**
* Classes and methods for executing tests.
@@ -98,7 +98,6 @@ class RunningProcess {
List<String> stderr;
List<Function> handlers;
-
RunningProcess(this.testCase, [this.timeout = NO_TIMEOUT]);
void exitHandler(int exitCode) {
@@ -153,18 +152,20 @@ class ProcessQueue {
int numProcesses = 0;
final int maxProcesses;
Queue<TestCase> tests;
+ ProgressIndicator progress;
- ProcessQueue(this.maxProcesses) : tests = new Queue<TestCase>();
+ ProcessQueue(this.maxProcesses, this.progress)
+ : tests = new Queue<TestCase>();
tryRunTest() {
if (numProcesses < maxProcesses && !tests.isEmpty()) {
TestCase test = tests.removeFirst();
- print("running ${test.displayName}");
+ progress.start(test);
// TODO(whesse): Refactor into various test output methods.
Function old_callback = test.completedHandler;
Function wrapper = (TestCase test_arg) {
numProcesses--;
- print("finished ${test_arg.displayName}");
+ progress.done(test_arg);
tryRunTest();
old_callback(test_arg);
};
@@ -177,6 +178,7 @@ class ProcessQueue {
}
runTest(TestCase test) {
+ progress.testAdded();
tests.add(test);
tryRunTest();
}
« no previous file with comments | « tools/testing/dart/test_progress.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698