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

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

Issue 2602783002: Add flutter_engine runtime to the test script so we can run standard dart tests from the test suite… (Closed)
Patch Set: Address code review comments. Created 3 years, 11 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 | « no previous file | tools/testing/dart/status_reporter.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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 51
52 case 'd8': 52 case 'd8':
53 return new D8RuntimeConfiguration(); 53 return new D8RuntimeConfiguration();
54 54
55 case 'none': 55 case 'none':
56 return new NoneRuntimeConfiguration(); 56 return new NoneRuntimeConfiguration();
57 57
58 case 'vm': 58 case 'vm':
59 return new StandaloneDartRuntimeConfiguration(); 59 return new StandaloneDartRuntimeConfiguration();
60 60
61 case 'flutter':
62 return new StandaloneFlutterEngineConfiguration();
63
61 case 'dart_precompiled': 64 case 'dart_precompiled':
62 if (configuration['system'] == 'android') { 65 if (configuration['system'] == 'android') {
63 return new DartPrecompiledAdbRuntimeConfiguration(useBlobs: useBlobs); 66 return new DartPrecompiledAdbRuntimeConfiguration(useBlobs: useBlobs);
64 } 67 }
65 return new DartPrecompiledRuntimeConfiguration(useBlobs: useBlobs); 68 return new DartPrecompiledRuntimeConfiguration(useBlobs: useBlobs);
66 69
67 case 'drt': 70 case 'drt':
68 return new DrtRuntimeConfiguration(); 71 return new DrtRuntimeConfiguration();
69 72
70 case 'self_check': 73 case 'self_check':
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 } 236 }
234 String executable = suite.configuration['noopt'] 237 String executable = suite.configuration['noopt']
235 ? suite.dartVmNooptBinaryFileName 238 ? suite.dartVmNooptBinaryFileName
236 : suite.dartVmBinaryFileName; 239 : suite.dartVmBinaryFileName;
237 return <Command>[ 240 return <Command>[
238 commandBuilder.getVmCommand(executable, arguments, environmentOverrides) 241 commandBuilder.getVmCommand(executable, arguments, environmentOverrides)
239 ]; 242 ];
240 } 243 }
241 } 244 }
242 245
246 /// The flutter engine binary, "sky_shell".
247 class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration {
248 List<Command> computeRuntimeCommands(
249 TestSuite suite,
250 CommandBuilder commandBuilder,
251 CommandArtifact artifact,
252 List<String> arguments,
253 Map<String, String> environmentOverrides) {
254 String script = artifact.filename;
255 String type = artifact.mimeType;
256 if (script != null &&
257 type != 'application/dart' &&
258 type != 'application/dart-snapshot') {
259 throw "Flutter Engine cannot run files of type '$type'.";
260 }
261 String executable = suite.flutterEngineBinaryFileName;
262 var args = <String>['--non-interactive']..addAll(arguments);
263 return <Command>[
264 commandBuilder.getVmCommand(executable, args, environmentOverrides)
265 ];
266 }
267 }
268
243 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration { 269 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration {
244 final bool useBlobs; 270 final bool useBlobs;
245 DartPrecompiledRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs; 271 DartPrecompiledRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs;
246 272
247 List<Command> computeRuntimeCommands( 273 List<Command> computeRuntimeCommands(
248 TestSuite suite, 274 TestSuite suite,
249 CommandBuilder commandBuilder, 275 CommandBuilder commandBuilder,
250 CommandArtifact artifact, 276 CommandArtifact artifact,
251 List<String> arguments, 277 List<String> arguments,
252 Map<String, String> environmentOverrides) { 278 Map<String, String> environmentOverrides) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 366 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
341 List<Command> computeRuntimeCommands( 367 List<Command> computeRuntimeCommands(
342 TestSuite suite, 368 TestSuite suite,
343 CommandBuilder commandBuilder, 369 CommandBuilder commandBuilder,
344 CommandArtifact artifact, 370 CommandArtifact artifact,
345 List<String> arguments, 371 List<String> arguments,
346 Map<String, String> environmentOverrides) { 372 Map<String, String> environmentOverrides) {
347 throw "Unimplemented runtime '$runtimeType'"; 373 throw "Unimplemented runtime '$runtimeType'";
348 } 374 }
349 } 375 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/status_reporter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698