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

Unified Diff: tools/testing/dart/test_options.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
Index: tools/testing/dart/test_options.dart
diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart
index 66e0e0a6cee48e9922f837179173402760132717..87d3f6d62483b05fc1f3057dbebd0da7c2acfc52 100644
--- a/tools/testing/dart/test_options.dart
+++ b/tools/testing/dart/test_options.dart
@@ -64,7 +64,7 @@ class TestOptionsParser {
'''Specify any compilation step (if needed).
none: Do not compile the Dart code (run native Dart code on the VM).
- (only valid with the following runtimes: vm, drt)
+ (only valid with the following runtimes: vm, flutter_engine, drt)
dart2js: Compile dart code to JavaScript by running dart2js.
(only valid with the following runtimes: d8, drt, chrome,
@@ -99,6 +99,8 @@ class TestOptionsParser {
'''Where the tests should be run.
vm: Run Dart code on the standalone dart vm.
+ flutter_engine: Run Dart code on the flutter engine.
+
dart_precompiled: Run a precompiled snapshot on a variant of the standalone
dart vm lacking a JIT.
@@ -129,6 +131,7 @@ class TestOptionsParser {
['-r', '--runtime'],
[
'vm',
+ 'flutter_engine',
'dart_precompiled',
'd8',
'jsshell',
@@ -307,6 +310,8 @@ class TestOptionsParser {
new _TestOptionSpecification(
'dart', 'Path to dart executable', ['--dart'], [], ''),
new _TestOptionSpecification(
+ 'engine', 'Path to flutter engine executable', ['--engine'], [], ''),
+ new _TestOptionSpecification(
'drt', // TODO(antonm): fix the option name.
'Path to content shell executable',
['--drt'],
@@ -626,6 +631,7 @@ Note: currently only implemented for dart2js.''',
'chrome',
'copy_coredumps',
'dart',
+ 'engine',
'dartium',
'drt',
'exclude_suite',
@@ -720,6 +726,7 @@ Note: currently only implemented for dart2js.''',
case 'none':
validRuntimes = const [
'vm',
+ 'flutter_engine',
'drt',
'dartium',
'ContentShellOnAndroid',
@@ -749,6 +756,15 @@ Note: currently only implemented for dart2js.''',
print("Cannot have both --use-repository-packages and "
"--use-public-packages");
}
+ if ((config['runtime'] == 'flutter_engine') && (config['engine'] == '')) {
+ isValid = false;
+ print("-rflutter_engine requires the flutter engine executable to "
Bill Hesse 2017/01/05 17:48:33 This code seems contradictory to the code in test_
siva 2017/01/05 20:38:45 Good point, I have taken out the default setting a
+ "be specified using --engine=");
+ }
+ if ((config['runtime'] == 'flutter_engine') && (config['arch'] != 'x64')) {
+ isValid = false;
+ print("-rflutter_engine is applicable only for --arch=x64");
+ }
return isValid;
}

Powered by Google App Engine
This is Rietveld 408576698