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

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

Issue 8835008: Correctly handle the --arch argument to dart test scripts. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix typo 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') | tools/testing/dart/test_suite.dart » ('j') | 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 297e46c1bd79d41f7d587b3cde33a971423fd7a9..4199c3d7901ed3d7feae73b209c1c58f822004a5 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -211,12 +211,7 @@ class DartcBatchRunnerProcess {
}
String _createArgumentsLine(List<String> arguments) {
- var buffer = new StringBuffer();
- for (var i = 0; i < arguments.length; i++) {
- buffer.add("${arguments[i]} ");
- }
- buffer.add("\n");
- return buffer.toString();
+ return Strings.join(arguments, ' ') + '\n';
}
int _reportResult(String output) {
@@ -296,6 +291,7 @@ class ProcessQueue {
int _numProcesses = 0;
int _activeTestListers = 0;
int _maxProcesses;
+ bool _verbose;
Function _enqueueMoreWork;
Queue<TestCase> _tests;
ProgressIndicator _progress;
@@ -304,12 +300,12 @@ class ProcessQueue {
ProcessQueue(int this._maxProcesses,
String progress,
+ bool this._verbose,
Date start_time,
Function this._enqueueMoreWork)
: _tests = new Queue<TestCase>(),
_progress = new ProgressIndicator.fromName(progress, start_time),
_batchProcesses = new List<DartcBatchRunnerProcess>() {
- _maxProcesses = _maxProcesses;
if (!_enqueueMoreWork(this)) _progress.allDone();
}
@@ -361,10 +357,17 @@ class ProcessQueue {
throw new Exception('Unable to find inactive batch runner.');
}
+ void _printTestCase(TestCase testCase) {
+ var path = testCase.executablePath;
+ var args = Strings.join(testCase.arguments, ' ');
+ print('# $path $args');
+ }
+
void _tryRunTest() {
_checkDone();
if (_numProcesses < _maxProcesses && !_tests.isEmpty()) {
TestCase test = _tests.removeFirst();
+ if (_verbose) _printTestCase(test);
_progress.start(test);
Function oldCallback = test.completedHandler;
Function wrapper = (TestCase test_arg) {
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | tools/testing/dart/test_suite.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698