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 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 String script = artifact.filename; | 263 String script = artifact.filename; |
264 String type = artifact.mimeType; | 264 String type = artifact.mimeType; |
265 if (script != null && type != 'application/dart-precompiled') { | 265 if (script != null && type != 'application/dart-precompiled') { |
266 throw "dart_precompiled cannot run files of type '$type'."; | 266 throw "dart_precompiled cannot run files of type '$type'."; |
267 } | 267 } |
268 | 268 |
269 var augmentedArgs = new List(); | 269 var augmentedArgs = new List(); |
270 augmentedArgs.add("--run-precompiled-snapshot=${artifact.filename}"); | 270 augmentedArgs.add("--run-precompiled-snapshot=${artifact.filename}"); |
271 augmentedArgs.addAll(arguments); | 271 augmentedArgs.addAll(arguments); |
272 | 272 |
273 var augmentedEnv = new Map.from(environmentOverrides); | |
274 augmentedEnv['LD_LIBRARY_PATH'] = artifact.filename; | |
275 | |
276 return <Command>[commandBuilder.getVmCommand( | 273 return <Command>[commandBuilder.getVmCommand( |
277 suite.dartPrecompiledBinaryFileName, augmentedArgs, augmentedEnv)]; | 274 suite.dartPrecompiledBinaryFileName, |
| 275 augmentedArgs, |
| 276 environmentOverrides)]; |
278 } | 277 } |
279 } | 278 } |
280 | 279 |
281 /// Temporary runtime configuration for browser runtimes that haven't been | 280 /// Temporary runtime configuration for browser runtimes that haven't been |
282 /// migrated yet. | 281 /// migrated yet. |
283 // TODO(ahe): Remove this class. | 282 // TODO(ahe): Remove this class. |
284 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { | 283 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { |
285 List<Command> computeRuntimeCommands( | 284 List<Command> computeRuntimeCommands( |
286 TestSuite suite, | 285 TestSuite suite, |
287 CommandBuilder commandBuilder, | 286 CommandBuilder commandBuilder, |
288 CommandArtifact artifact, | 287 CommandArtifact artifact, |
289 List<String> arguments, | 288 List<String> arguments, |
290 Map<String, String> environmentOverrides) { | 289 Map<String, String> environmentOverrides) { |
291 throw "Unimplemented runtime '$runtimeType'"; | 290 throw "Unimplemented runtime '$runtimeType'"; |
292 } | 291 } |
293 } | 292 } |
OLD | NEW |