| Index: tools/testing/dart/runtime_configuration.dart
|
| diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
|
| index 1fbf54dc409b23cc2515ef5894eafe2213a47507..55810eb863cba08944176c01626379411743b9de 100644
|
| --- a/tools/testing/dart/runtime_configuration.dart
|
| +++ b/tools/testing/dart/runtime_configuration.dart
|
| @@ -52,6 +52,9 @@ class RuntimeConfiguration {
|
| case 'vm':
|
| return new StandaloneDartRuntimeConfiguration();
|
|
|
| + case 'dart_precompiled':
|
| + return new DartPrecompiledRuntimeConfiguration();
|
| +
|
| case 'drt':
|
| return new DrtRuntimeConfiguration();
|
|
|
| @@ -218,6 +221,32 @@ class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
|
| }
|
| }
|
|
|
| +
|
| +class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration {
|
| + List<Command> computeRuntimeCommands(
|
| + TestSuite suite,
|
| + CommandBuilder commandBuilder,
|
| + CommandArtifact artifact,
|
| + List<String> arguments,
|
| + Map<String, String> environmentOverrides) {
|
| + String script = artifact.filename;
|
| + String type = artifact.mimeType;
|
| + if (script != null && type != 'application/dart-precompiled') {
|
| + throw "dart_precompiled cannot run files of type '$type'.";
|
| + }
|
| +
|
| + var augmentedArgs = new List();
|
| + augmentedArgs.add("--run-precompiled-snapshot=${artifact.filename}");
|
| + augmentedArgs.addAll(arguments);
|
| +
|
| + var augmentedEnv = new Map.from(environmentOverrides);
|
| + augmentedEnv['LD_LIBRARY_PATH'] = artifact.filename;
|
| +
|
| + return <Command>[commandBuilder.getVmCommand(
|
| + suite.dartPrecompiledBinaryFileName, augmentedArgs, augmentedEnv)];
|
| + }
|
| +}
|
| +
|
| /// Temporary runtime configuration for browser runtimes that haven't been
|
| /// migrated yet.
|
| // TODO(ahe): Remove this class.
|
|
|