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

Unified Diff: tools/testing/dart/test_options.dart

Issue 1687493002: Add dart2snapshot compiler and dart_snapshotted runtime to test scripts (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
Index: tools/testing/dart/test_options.dart
diff --git a/tools/testing/dart/test_options.dart b/tools/testing/dart/test_options.dart
index 8e23169fea7e59c3f641d50db9ec1ab32b75252a..990de7aec4fb9432b537b99ca1508cd4b5c9db03 100644
--- a/tools/testing/dart/test_options.dart
+++ b/tools/testing/dart/test_options.dart
@@ -65,9 +65,13 @@ class TestOptionsParser {
none (compile only)),
dart2analyzer: Perform static analysis on Dart code by running the analyzer
- (only valid with the following runtimes: none)''',
+ (only valid with the following runtimes: none)
+
+ dart2snapshot: Compile the Dart code into a snapshot before running the test
+ (only valid with the following runtimes: dart_snapshotted)''',
['-c', '--compiler'],
- ['none', 'precompiler', 'dart2js', 'dart2analyzer'],
+ ['none', 'precompiler', 'dart2js', 'dart2analyzer',
+ 'dart2snapshot'],
'none'),
// TODO(antonm): fix the option drt.
new _TestOptionSpecification(
@@ -78,6 +82,8 @@ class TestOptionsParser {
dart_precompiled: Run a precompiled snapshot on a variant of the standalone
dart vm lacking a JIT.
+ dart_snapshotted: Run a full snapshot.
+
d8: Run JavaScript from the command line using v8.
jsshell: Run JavaScript from the command line using firefox js-shell.
@@ -98,7 +104,8 @@ class TestOptionsParser {
none: No runtime, compile only (for example, used for dart2analyzer static
analysis tests).''',
['-r', '--runtime'],
- ['vm', 'dart_precompiled', 'd8', 'jsshell', 'drt', 'dartium',
+ ['vm', 'dart_precompiled', 'dart_snapshotted',
+ 'd8', 'jsshell', 'drt', 'dartium',
'ff', 'firefox',
'chrome', 'safari', 'ie9', 'ie10', 'ie11', 'opera',
'chromeOnAndroid', 'safarimobilesim',
@@ -648,6 +655,9 @@ Note: currently only implemented for dart2js.''',
case 'dart2analyzer':
validRuntimes = const ['none'];
break;
+ case 'dart2snapshot':
+ validRuntimes = const ['dart_snapshotted'];
+ break;
case 'precompiler':
validRuntimes = const ['dart_precompiled'];
break;

Powered by Google App Engine
This is Rietveld 408576698