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

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 self code review. 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
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_engine':
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.skyBinaryFileName;
262 var args = new List();
Bill Hesse 2017/01/05 17:48:33 I see this is just copied from other cases, but su
siva 2017/01/05 20:38:45 Done.
263 args.add('--non-interactive');
264 args.addAll(arguments);
265 return <Command>[
266 commandBuilder.getVmCommand(executable, args, environmentOverrides)
267 ];
268 }
269 }
270
243 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration { 271 class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration {
244 final bool useBlobs; 272 final bool useBlobs;
245 DartPrecompiledRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs; 273 DartPrecompiledRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs;
246 274
247 List<Command> computeRuntimeCommands( 275 List<Command> computeRuntimeCommands(
248 TestSuite suite, 276 TestSuite suite,
249 CommandBuilder commandBuilder, 277 CommandBuilder commandBuilder,
250 CommandArtifact artifact, 278 CommandArtifact artifact,
251 List<String> arguments, 279 List<String> arguments,
252 Map<String, String> environmentOverrides) { 280 Map<String, String> environmentOverrides) {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration { 368 class DummyRuntimeConfiguration extends DartVmRuntimeConfiguration {
341 List<Command> computeRuntimeCommands( 369 List<Command> computeRuntimeCommands(
342 TestSuite suite, 370 TestSuite suite,
343 CommandBuilder commandBuilder, 371 CommandBuilder commandBuilder,
344 CommandArtifact artifact, 372 CommandArtifact artifact,
345 List<String> arguments, 373 List<String> arguments,
346 Map<String, String> environmentOverrides) { 374 Map<String, String> environmentOverrides) {
347 throw "Unimplemented runtime '$runtimeType'"; 375 throw "Unimplemented runtime '$runtimeType'";
348 } 376 }
349 } 377 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/status_reporter.dart » ('j') | tools/testing/dart/test_options.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698