| Index: tools/testing/dart/test_runner.dart
|
| diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
|
| index 300fbeea64a564c7b2d69d35bd5571c09dc3edb1..bbddef2f6ac3f1057573834553eec47d1ea828eb 100644
|
| --- a/tools/testing/dart/test_runner.dart
|
| +++ b/tools/testing/dart/test_runner.dart
|
| @@ -1955,7 +1955,7 @@ class BatchRunnerProcess {
|
| // This is a unix shell script, no windows equivalent available
|
| 'run_executable' : 'editor/tools/analyzer',
|
| 'run_arguments' : ['--batch'],
|
| - },
|
| + },
|
| };
|
|
|
| Completer<CommandOutput> _completer;
|
| @@ -1978,7 +1978,9 @@ class BatchRunnerProcess {
|
| DateTime _startTime;
|
| Timer _timer;
|
|
|
| - BatchRunnerProcess();
|
| + final String _executable;
|
| +
|
| + BatchRunnerProcess(this._executable);
|
|
|
| Future<CommandOutput> runCommand(String runnerType, ProcessCommand command,
|
| int timeout, List<String> arguments) {
|
| @@ -2091,8 +2093,15 @@ class BatchRunnerProcess {
|
| }
|
|
|
| _startProcess(callback) {
|
| - var executable = batchRunnerTypes[_runnerType]['run_executable'];
|
| - var arguments = batchRunnerTypes[_runnerType]['run_arguments'];
|
| + var executable;
|
| + var arguments;
|
| + if (_runnerType == 'dart2js') {
|
| + executable = _executable;
|
| + arguments = ['--batch'];
|
| + } else {
|
| + executable = batchRunnerTypes[_runnerType]['run_executable'];
|
| + arguments = batchRunnerTypes[_runnerType]['run_arguments'];
|
| + }
|
| var environment = new Map.from(io.Platform.environment);
|
| if (_processEnvironmentOverrides != null) {
|
| for (var key in _processEnvironmentOverrides.keys) {
|
| @@ -2530,8 +2539,11 @@ class CommandExecutorImpl implements CommandExecutor {
|
|
|
| if (command is BrowserTestCommand) {
|
| return _startBrowserControllerTest(command, timeout);
|
| + } else if (command is CompilationCommand && batchMode) {
|
| + return _getBatchRunner(command.executable, "dart2js")
|
| + .runCommand("dart2js", command, timeout, command.arguments);
|
| } else if (command is AnalysisCommand && batchMode) {
|
| - return _getBatchRunner(command.flavor)
|
| + return _getBatchRunner(null, command.flavor)
|
| .runCommand(command.flavor, command, timeout, command.arguments);
|
| } else if (command is ScriptCommand) {
|
| return command.run();
|
| @@ -2540,13 +2552,13 @@ class CommandExecutorImpl implements CommandExecutor {
|
| }
|
| }
|
|
|
| - BatchRunnerProcess _getBatchRunner(String identifier) {
|
| + BatchRunnerProcess _getBatchRunner(String executable, String identifier) {
|
| // Start batch processes if needed
|
| var runners = _batchProcesses[identifier];
|
| if (runners == null) {
|
| runners = new List<BatchRunnerProcess>(maxProcesses);
|
| for (int i = 0; i < maxProcesses; i++) {
|
| - runners[i] = new BatchRunnerProcess();
|
| + runners[i] = new BatchRunnerProcess(executable);
|
| }
|
| _batchProcesses[identifier] = runners;
|
| }
|
|
|