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

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 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 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') | no next file with comments »
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..87fd0f5d9708ca129e9e505ea8117b3b332a4c55 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':
+ return new StandaloneFlutterEngineConfiguration();
+
case 'dart_precompiled':
if (configuration['system'] == 'android') {
return new DartPrecompiledAdbRuntimeConfiguration(useBlobs: useBlobs);
@@ -240,6 +243,29 @@ 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.flutterEngineBinaryFileName;
+ var args = <String>['--non-interactive']..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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698