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

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

Issue 9053009: Add --list option to tools/test.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years 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_options.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 1e9522337f5f265dbb5c8a008b9f7da2d0b5832c..4828cbb4afcc49557d12c48416ac5170e2aefcfc 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -385,6 +385,7 @@ class ProcessQueue {
int _activeTestListers = 0;
int _maxProcesses;
bool _verbose;
+ bool _listTests;
Function _enqueueMoreWork;
Queue<TestCase> _tests;
ProgressIndicator _progress;
@@ -397,16 +398,19 @@ class ProcessQueue {
ProcessQueue(int this._maxProcesses,
String progress,
- bool this._verbose,
Date startTime,
bool printTiming,
- Function this._enqueueMoreWork)
+ Function this._enqueueMoreWork,
+ [bool verbose = false,
+ bool listTests = false])
: _tests = new Queue<TestCase>(),
_progress = new ProgressIndicator.fromName(progress,
startTime,
printTiming),
_batchProcesses = new List<DartcBatchRunnerProcess>(),
- _testCache = new Map<String, List<TestInformation>>() {
+ _testCache = new Map<String, List<TestInformation>>(),
+ _verbose = verbose,
+ _listTests = listTests {
if (!_enqueueMoreWork(this)) _progress.allDone();
}
@@ -463,6 +467,10 @@ class ProcessQueue {
if (_numProcesses < _maxProcesses && !_tests.isEmpty()) {
TestCase test = _tests.removeFirst();
if (_verbose) print(test.commandLine);
+ if (_listTests) {
+ print(test.commandLine);
+ return;
+ }
_progress.start(test);
Function oldCallback = test.completedHandler;
Function wrapper = (TestCase test_arg) {
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698