OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library runtime_configuration; | 5 library runtime_configuration; |
6 | 6 |
7 import 'compiler_configuration.dart' show | 7 import 'compiler_configuration.dart' show |
8 CommandArtifact; | 8 CommandArtifact; |
9 | 9 |
10 // TODO(ahe): Remove this import, we can precompute all the values required | 10 // TODO(ahe): Remove this import, we can precompute all the values required |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 TestSuite suite, | 211 TestSuite suite, |
212 CommandBuilder commandBuilder, | 212 CommandBuilder commandBuilder, |
213 CommandArtifact artifact, | 213 CommandArtifact artifact, |
214 List<String> arguments, | 214 List<String> arguments, |
215 Map<String, String> environmentOverrides) { | 215 Map<String, String> environmentOverrides) { |
216 String script = artifact.filename; | 216 String script = artifact.filename; |
217 String type = artifact.mimeType; | 217 String type = artifact.mimeType; |
218 if (script != null && type != 'application/dart') { | 218 if (script != null && type != 'application/dart') { |
219 throw "Dart VM cannot run files of type '$type'."; | 219 throw "Dart VM cannot run files of type '$type'."; |
220 } | 220 } |
| 221 String executable = suite.configuration['noopt'] |
| 222 ? suite.dartVmNooptBinaryFileName |
| 223 : suite.dartVmBinaryFileName; |
221 return <Command>[commandBuilder.getVmCommand( | 224 return <Command>[commandBuilder.getVmCommand( |
222 suite.dartVmBinaryFileName, arguments, environmentOverrides)]; | 225 executable, arguments, environmentOverrides)]; |
223 } | 226 } |
224 } | 227 } |
225 | 228 |
226 | 229 |
227 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration { | 230 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration { |
228 List<Command> computeRuntimeCommands( | 231 List<Command> computeRuntimeCommands( |
229 TestSuite suite, | 232 TestSuite suite, |
230 CommandBuilder commandBuilder, | 233 CommandBuilder commandBuilder, |
231 CommandArtifact artifact, | 234 CommandArtifact artifact, |
232 List<String> arguments, | 235 List<String> arguments, |
(...skipping 22 matching lines...) Expand all Loading... |
255 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { | 258 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { |
256 List<Command> computeRuntimeCommands( | 259 List<Command> computeRuntimeCommands( |
257 TestSuite suite, | 260 TestSuite suite, |
258 CommandBuilder commandBuilder, | 261 CommandBuilder commandBuilder, |
259 CommandArtifact artifact, | 262 CommandArtifact artifact, |
260 List<String> arguments, | 263 List<String> arguments, |
261 Map<String, String> environmentOverrides) { | 264 Map<String, String> environmentOverrides) { |
262 throw "Unimplemented runtime '$runtimeType'"; | 265 throw "Unimplemented runtime '$runtimeType'"; |
263 } | 266 } |
264 } | 267 } |
OLD | NEW |