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 'dart:io' show Directory, File; | 7 import 'dart:io' show Directory, File; |
8 | 8 |
9 import 'compiler_configuration.dart' show CommandArtifact; | 9 import 'compiler_configuration.dart' show CommandArtifact; |
10 | 10 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 CommandArtifact artifact, | 227 CommandArtifact artifact, |
228 List<String> arguments, | 228 List<String> arguments, |
229 Map<String, String> environmentOverrides) { | 229 Map<String, String> environmentOverrides) { |
230 String script = artifact.filename; | 230 String script = artifact.filename; |
231 String type = artifact.mimeType; | 231 String type = artifact.mimeType; |
232 if (script != null && | 232 if (script != null && |
233 type != 'application/dart' && | 233 type != 'application/dart' && |
234 type != 'application/dart-snapshot') { | 234 type != 'application/dart-snapshot') { |
235 throw "Dart VM cannot run files of type '$type'."; | 235 throw "Dart VM cannot run files of type '$type'."; |
236 } | 236 } |
237 String executable = suite.configuration['noopt'] | 237 String executable = suite.dartVmBinaryFileName; |
238 ? suite.dartVmNooptBinaryFileName | |
239 : suite.dartVmBinaryFileName; | |
240 return <Command>[ | 238 return <Command>[ |
241 commandBuilder.getVmCommand(executable, arguments, environmentOverrides) | 239 commandBuilder.getVmCommand(executable, arguments, environmentOverrides) |
242 ]; | 240 ]; |
243 } | 241 } |
244 } | 242 } |
245 | 243 |
246 /// The flutter engine binary, "sky_shell". | 244 /// The flutter engine binary, "sky_shell". |
247 class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration { | 245 class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration { |
248 List<Command> computeRuntimeCommands( | 246 List<Command> computeRuntimeCommands( |
249 TestSuite suite, | 247 TestSuite suite, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { | 364 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { |
367 List<Command> computeRuntimeCommands( | 365 List<Command> computeRuntimeCommands( |
368 TestSuite suite, | 366 TestSuite suite, |
369 CommandBuilder commandBuilder, | 367 CommandBuilder commandBuilder, |
370 CommandArtifact artifact, | 368 CommandArtifact artifact, |
371 List<String> arguments, | 369 List<String> arguments, |
372 Map<String, String> environmentOverrides) { | 370 Map<String, String> environmentOverrides) { |
373 throw "Unimplemented runtime '$runtimeType'"; | 371 throw "Unimplemented runtime '$runtimeType'"; |
374 } | 372 } |
375 } | 373 } |
OLD | NEW |