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

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

Issue 435603005: Add --dart2js-options flag to test command (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/test_suite.dart
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index a1ac5abf9b6cec08892db06a88aa255100914efa..57fbd57c6a4d0e6d262a3ebc1a0ba865a2121287 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -2106,17 +2106,23 @@ class TestUtils {
}
/**
- * Gets extra vm options passed to the testing script.
+ * Gets extra options under [key] passed to the testing script.
*/
- static List<String> getExtraVmOptions(Map configuration) {
- var extraVmOptions = [];
- if (configuration['vm_options'] != null) {
- extraVmOptions = configuration['vm_options'].split(" ");
- extraVmOptions.removeWhere((s) => s.trim() == "");
- }
- return extraVmOptions;
+ static List<String> getExtraOptions(Map configuration, String key) {
+ if (configuration[key] == null) return <String>[];
+ return configuration[key]
+ .split(" ")
+ .map((s) => s.trim())
+ .where((s) => s.isNotEmpty)
+ .toList();
}
+ /**
+ * Gets extra vm options passed to the testing script.
+ */
+ static List<String> getExtraVmOptions(Map configuration) =>
+ getExtraOptions(configuration, 'vm_options');
+
static String getShortName(String path) {
final PATH_REPLACEMENTS = const {
"pkg_polymer_e2e_test_bad_import_test": "polymer_bi",
« no previous file with comments | « tools/testing/dart/test_options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698