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

Unified 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 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/status_reporter.dart » ('j') | tools/testing/dart/test_options.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/runtime_configuration.dart
diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
index d3747eac06b1479d34cd6ec5755b591e7f39ecac..5a7047955ee36804a07b4bb0c9bcfbb6b5b35d69 100644
--- a/tools/testing/dart/runtime_configuration.dart
+++ b/tools/testing/dart/runtime_configuration.dart
@@ -58,6 +58,9 @@ class RuntimeConfiguration {
case 'vm':
return new StandaloneDartRuntimeConfiguration();
+ case 'flutter_engine':
+ return new StandaloneFlutterEngineConfiguration();
+
case 'dart_precompiled':
if (configuration['system'] == 'android') {
return new DartPrecompiledAdbRuntimeConfiguration(useBlobs: useBlobs);
@@ -240,6 +243,31 @@ class StandaloneDartRuntimeConfiguration extends DartVmRuntimeConfiguration {
}
}
+/// The flutter engine binary, "sky_shell".
+class StandaloneFlutterEngineConfiguration extends DartVmRuntimeConfiguration {
+ List<Command> computeRuntimeCommands(
+ TestSuite suite,
+ CommandBuilder commandBuilder,
+ CommandArtifact artifact,
+ List<String> arguments,
+ Map<String, String> environmentOverrides) {
+ String script = artifact.filename;
+ String type = artifact.mimeType;
+ if (script != null &&
+ type != 'application/dart' &&
+ type != 'application/dart-snapshot') {
+ throw "Flutter Engine cannot run files of type '$type'.";
+ }
+ String executable = suite.skyBinaryFileName;
+ 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.
+ args.add('--non-interactive');
+ args.addAll(arguments);
+ return <Command>[
+ commandBuilder.getVmCommand(executable, args, environmentOverrides)
+ ];
+ }
+}
+
class DartPrecompiledRuntimeConfiguration extends DartVmRuntimeConfiguration {
final bool useBlobs;
DartPrecompiledRuntimeConfiguration({bool useBlobs}) : useBlobs = useBlobs;
« 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