| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 } | 220 } |
| 221 | 221 |
| 222 /// The standalone Dart VM binary, "dart" or "dart.exe". | 222 /// The standalone Dart VM binary, "dart" or "dart.exe". |
| 223 class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration { | 223 class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration { |
| 224 List<Command> computeRuntimeCommands( | 224 List<Command> computeRuntimeCommands( |
| 225 TestSuite suite, | 225 TestSuite suite, |
| 226 CommandBuilder commandBuilder, | 226 CommandBuilder commandBuilder, |
| 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 final bool needsDFERunner = suite.configuration['compiler'] == 'dartk' && |
| 231 !suite.configuration['use-standalone-dartk']; |
| 230 String script = artifact.filename; | 232 String script = artifact.filename; |
| 231 String type = artifact.mimeType; | 233 String type = artifact.mimeType; |
| 232 if (script != null && | 234 if (script != null && |
| 233 type != 'application/dart' && | 235 type != 'application/dart' && |
| 234 type != 'application/dart-snapshot') { | 236 type != 'application/dart-snapshot') { |
| 235 throw "Dart VM cannot run files of type '$type'."; | 237 throw "Dart VM cannot run files of type '$type'."; |
| 236 } | 238 } |
| 237 String executable = suite.dartVmBinaryFileName; | 239 String executable = suite.dartVmBinaryFileName; |
| 238 return <Command>[ | 240 return <Command>[ |
| 239 commandBuilder.getVmCommand(executable, arguments, environmentOverrides) | 241 commandBuilder.getVmCommand(executable, arguments, environmentOverrides, n
eedsDFERunner: needsDFERunner) |
| 240 ]; | 242 ]; |
| 241 } | 243 } |
| 242 } | 244 } |
| 243 | 245 |
| 244 /// The flutter engine binary, "sky_shell". | 246 /// The flutter engine binary, "sky_shell". |
| 245 class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration { | 247 class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration { |
| 246 List<Command> computeRuntimeCommands( | 248 List<Command> computeRuntimeCommands( |
| 247 TestSuite suite, | 249 TestSuite suite, |
| 248 CommandBuilder commandBuilder, | 250 CommandBuilder commandBuilder, |
| 249 CommandArtifact artifact, | 251 CommandArtifact artifact, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { | 363 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { |
| 362 List<Command> computeRuntimeCommands( | 364 List<Command> computeRuntimeCommands( |
| 363 TestSuite suite, | 365 TestSuite suite, |
| 364 CommandBuilder commandBuilder, | 366 CommandBuilder commandBuilder, |
| 365 CommandArtifact artifact, | 367 CommandArtifact artifact, |
| 366 List<String> arguments, | 368 List<String> arguments, |
| 367 Map<String, String> environmentOverrides) { | 369 Map<String, String> environmentOverrides) { |
| 368 throw "Unimplemented runtime '$runtimeType'"; | 370 throw "Unimplemented runtime '$runtimeType'"; |
| 369 } | 371 } |
| 370 } | 372 } |
| OLD | NEW |