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

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

Issue 2671503002: Revert "Delete app jit or aot snapshots as each test is completed to reduce the amount of disk spac… (Closed)
Patch Set: Created 3 years, 10 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') | tools/testing/dart/test_runner.dart » ('j') | 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 '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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 final bool needsDFERunner = suite.configuration['compiler'] == 'dartk' && 230 final bool needsDFERunner = suite.configuration['compiler'] == 'dartk' &&
231 !suite.configuration['use-standalone-dartk']; 231 !suite.configuration['use-standalone-dartk'];
232 String script = artifact.filename; 232 String script = artifact.filename;
233 String type = artifact.mimeType; 233 String type = artifact.mimeType;
234 if (script != null && 234 if (script != null &&
235 type != 'application/dart' && 235 type != 'application/dart' &&
236 type != 'application/dart-snapshot') { 236 type != 'application/dart-snapshot') {
237 throw "Dart VM cannot run files of type '$type'."; 237 throw "Dart VM cannot run files of type '$type'.";
238 } 238 }
239 String executable = suite.dartVmBinaryFileName; 239 String executable = suite.dartVmBinaryFileName;
240 var commands = new List<Command>(); 240 return <Command>[
241 commands.add(commandBuilder.getVmCommand(executable, 241 commandBuilder.getVmCommand(executable, arguments, environmentOverrides, n eedsDFERunner: needsDFERunner)
242 arguments, 242 ];
243 environmentOverrides,
244 needsDFERunner: needsDFERunner));
245 if (type == 'application/dart-snapshot') {
246 // Delete snapshots as we go to reduce the space required to run the test
247 // suite.
248 commands.add(commandBuilder.getDeleteCommand(script));
249 }
250 return commands;
251 } 243 }
252 } 244 }
253 245
254 /// The flutter engine binary, "sky_shell". 246 /// The flutter engine binary, "sky_shell".
255 class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration { 247 class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration {
256 List<Command> computeRuntimeCommands( 248 List<Command> computeRuntimeCommands(
257 TestSuite suite, 249 TestSuite suite,
258 CommandBuilder commandBuilder, 250 CommandBuilder commandBuilder,
259 CommandArtifact artifact, 251 CommandArtifact artifact,
260 List<String> arguments, 252 List<String> arguments,
(...skipping 22 matching lines...) Expand all
283 CommandBuilder commandBuilder, 275 CommandBuilder commandBuilder,
284 CommandArtifact artifact, 276 CommandArtifact artifact,
285 List<String> arguments, 277 List<String> arguments,
286 Map<String, String> environmentOverrides) { 278 Map<String, String> environmentOverrides) {
287 String script = artifact.filename; 279 String script = artifact.filename;
288 String type = artifact.mimeType; 280 String type = artifact.mimeType;
289 if (script != null && type != 'application/dart-precompiled') { 281 if (script != null && type != 'application/dart-precompiled') {
290 throw "dart_precompiled cannot run files of type '$type'."; 282 throw "dart_precompiled cannot run files of type '$type'.";
291 } 283 }
292 284
293 var commands = new List<Command>(); 285 return <Command>[
294 commands.add(commandBuilder.getVmCommand(suite.dartPrecompiledBinaryFileName , 286 commandBuilder.getVmCommand(suite.dartPrecompiledBinaryFileName,
295 arguments, environmentOverrides)); 287 arguments, environmentOverrides)
296 // Delete snapshots (dylibs or blobs) as we go to reduce the space required 288 ];
297 // to run the test suite.
298 commands.add(commandBuilder.getDeleteCommand(script));
299 return commands;
300 } 289 }
301 } 290 }
302 291
303 class DartPrecompiledAdbRuntimeConfiguration 292 class DartPrecompiledAdbRuntimeConfiguration
304 extends DartVmRuntimeConfiguration { 293 extends DartVmRuntimeConfiguration {
305 static const String DeviceDir = 294 static const String DeviceDir =
306 '/data/local/tmp/precompilation-testing'; 295 '/data/local/tmp/precompilation-testing';
307 static const String DeviceTestDir = 296 static const String DeviceTestDir =
308 '/data/local/tmp/precompilation-testing/test'; 297 '/data/local/tmp/precompilation-testing/test';
309 298
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 363 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
375 List<Command> computeRuntimeCommands( 364 List<Command> computeRuntimeCommands(
376 TestSuite suite, 365 TestSuite suite,
377 CommandBuilder commandBuilder, 366 CommandBuilder commandBuilder,
378 CommandArtifact artifact, 367 CommandArtifact artifact,
379 List<String> arguments, 368 List<String> arguments,
380 Map<String, String> environmentOverrides) { 369 Map<String, String> environmentOverrides) {
381 throw "Unimplemented runtime '$runtimeType'"; 370 throw "Unimplemented runtime '$runtimeType'";
382 } 371 }
383 } 372 }
OLDNEW
« no previous file with comments | « tools/testing/dart/compiler_configuration.dart ('k') | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698