Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: tools/testing/dart/runtime_configuration.dart

Issue 1947783003: Simplify command line options for creating snapshots. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 CommandArtifact; 7 import 'compiler_configuration.dart' show CommandArtifact;
8 8
9 // TODO(ahe): Remove this import, we can precompute all the values required 9 // TODO(ahe): Remove this import, we can precompute all the values required
10 // from TestSuite once the refactoring is complete. 10 // from TestSuite once the refactoring is complete.
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 CommandArtifact artifact, 231 CommandArtifact artifact,
232 List<String> arguments, 232 List<String> arguments,
233 Map<String, String> environmentOverrides) { 233 Map<String, String> environmentOverrides) {
234 String script = artifact.filename; 234 String script = artifact.filename;
235 String type = artifact.mimeType; 235 String type = artifact.mimeType;
236 if (script != null && type != 'application/dart-snapshot') { 236 if (script != null && type != 'application/dart-snapshot') {
237 throw "dart_product cannot run files of type '$type'."; 237 throw "dart_product cannot run files of type '$type'.";
238 } 238 }
239 239
240 var augmentedArgs = new List(); 240 var augmentedArgs = new List();
241 augmentedArgs.add("--run-full-snapshot=${artifact.filename}"); 241 augmentedArgs.add("--run-app-snapshot=${artifact.filename}");
242 augmentedArgs.addAll(arguments); 242 augmentedArgs.addAll(arguments);
243 243
244 return <Command>[ 244 return <Command>[
245 commandBuilder.getVmCommand(suite.dartVmBinaryFileName, 245 commandBuilder.getVmCommand(suite.dartVmBinaryFileName,
246 augmentedArgs, environmentOverrides) 246 augmentedArgs, environmentOverrides)
247 ]; 247 ];
248 } 248 }
249 } 249 }
250 250
251 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration { 251 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration {
252 final bool useBlobs; 252 final bool useBlobs;
253 DartPrecompiledRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs; 253 DartPrecompiledRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs;
254 254
255 List<Command> computeRuntimeCommands( 255 List<Command> computeRuntimeCommands(
256 TestSuite suite, 256 TestSuite suite,
257 CommandBuilder commandBuilder, 257 CommandBuilder commandBuilder,
258 CommandArtifact artifact, 258 CommandArtifact artifact,
259 List<String> arguments, 259 List<String> arguments,
260 Map<String, String> environmentOverrides) { 260 Map<String, String> environmentOverrides) {
261 String script = artifact.filename; 261 String script = artifact.filename;
262 String type = artifact.mimeType; 262 String type = artifact.mimeType;
263 if (script != null && type != 'application/dart-precompiled') { 263 if (script != null && type != 'application/dart-precompiled') {
264 throw "dart_precompiled cannot run files of type '$type'."; 264 throw "dart_precompiled cannot run files of type '$type'.";
265 } 265 }
266 266
267 var augmentedArgs = new List(); 267 var augmentedArgs = new List();
268 augmentedArgs.add("--run-precompiled-snapshot=${artifact.filename}"); 268 augmentedArgs.add("--run-app-snapshot=${artifact.filename}");
269 if (useBlobs) { 269 if (useBlobs) {
270 augmentedArgs.add("--use_blobs"); 270 augmentedArgs.add("--use-blobs");
271 } 271 }
272 augmentedArgs.addAll(arguments); 272 augmentedArgs.addAll(arguments);
273 273
274 return <Command>[ 274 return <Command>[
275 commandBuilder.getVmCommand(suite.dartPrecompiledBinaryFileName, 275 commandBuilder.getVmCommand(suite.dartPrecompiledBinaryFileName,
276 augmentedArgs, environmentOverrides) 276 augmentedArgs, environmentOverrides)
277 ]; 277 ];
278 } 278 }
279 } 279 }
280 280
(...skipping 29 matching lines...) Expand all
310 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 310 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
311 List<Command> computeRuntimeCommands( 311 List<Command> computeRuntimeCommands(
312 TestSuite suite, 312 TestSuite suite,
313 CommandBuilder commandBuilder, 313 CommandBuilder commandBuilder,
314 CommandArtifact artifact, 314 CommandArtifact artifact,
315 List<String> arguments, 315 List<String> arguments,
316 Map<String, String> environmentOverrides) { 316 Map<String, String> environmentOverrides) {
317 throw "Unimplemented runtime '$runtimeType'"; 317 throw "Unimplemented runtime '$runtimeType'";
318 } 318 }
319 } 319 }
OLDNEW
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698