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

Side by Side Diff: tools/testing/dart/test_config_utils.dart

Issue 8588028: Use the right command for dartc. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library("test_config_utils"); 5 #library("test_config_utils");
6 6
7 /** 7 /**
8 * TestUtils is a collection of utility methods used to write 8 * TestUtils is a collection of utility methods used to write
9 * test_config.dart scripts for test suites. 9 * test_config.dart scripts for test suites.
10 */ 10 */
11 class TestUtils { 11 class TestUtils {
12 12
13 /** 13 /**
14 * Get a list of argument lists for the dart shell command. 14 * Get a list of argument lists for the dart shell command.
15 */ 15 */
16 static List<List<String>> argumentLists(String filename, 16 static List<List<String>> argumentLists(String filename,
17 Map optionsFromFile, 17 Map optionsFromFile,
18 Map configuration) { 18 Map configuration) {
19 List args = ["--ignore-unrecognized-flags"]; 19 List args = ["--ignore-unrecognized-flags"];
20 if (configuration["checked"]) { 20 if (configuration["checked"]) {
21 args.add("--enable_type_checks"); 21 args.add("--enable_type_checks");
22 } 22 }
23 if (configuration["component"] == "leg") { 23 if (configuration["component"] == "leg") {
24 args.add("--enable_leg"); 24 args.add("--enable_leg");
25 } 25 }
26 if (configuration["component"] == "dartc") {
27 if (configuration["mode"] == "release") {
28 args.add("--optimize");
29 }
30 }
26 31
27 List<String> dartOptions = optionsFromFile["dartOptions"]; 32 List<String> dartOptions = optionsFromFile["dartOptions"];
28 args.addAll(dartOptions == null ? [filename] : dartOptions); 33 args.addAll(dartOptions == null ? [filename] : dartOptions);
29 34
30 var result = new List<List<String>>(); 35 var result = new List<List<String>>();
31 List<List<String>> vmOptionsList = optionsFromFile["vmOptions"]; 36 List<List<String>> vmOptionsList = optionsFromFile["vmOptions"];
32 if (vmOptionsList.isEmpty()) { 37 if (vmOptionsList.isEmpty()) {
33 result.add(args); 38 result.add(args);
34 } else { 39 } else {
35 for (var vmOptions in vmOptionsList) { 40 for (var vmOptions in vmOptionsList) {
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } else if (contents.contains("@dynamic-type-error") && 92 } else if (contents.contains("@dynamic-type-error") &&
88 configuration['checked']) { 93 configuration['checked']) {
89 isNegative = true; 94 isNegative = true;
90 } 95 }
91 96
92 return { "vmOptions": result, 97 return { "vmOptions": result,
93 "dartOptions": dartOptions, 98 "dartOptions": dartOptions,
94 "isNegative" : isNegative }; 99 "isNegative" : isNegative };
95 } 100 }
96 } 101 }
OLDNEW
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698