| OLD | NEW |
| 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_suite"); | 5 #library("test_suite"); |
| 6 | 6 |
| 7 #import("status_file_parser.dart"); | 7 #import("status_file_parser.dart"); |
| 8 #import("test_runner.dart"); | 8 #import("test_runner.dart"); |
| 9 #import("multitest.dart"); | 9 #import("multitest.dart"); |
| 10 | 10 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 | 256 |
| 257 List<List<String>> argumentListsFromFile(String filename, | 257 List<List<String>> argumentListsFromFile(String filename, |
| 258 Map optionsFromFile) { | 258 Map optionsFromFile) { |
| 259 List args = TestUtils.standardOptions(configuration); | 259 List args = TestUtils.standardOptions(configuration); |
| 260 args.addAll(additionalOptions()); | 260 args.addAll(additionalOptions()); |
| 261 | 261 |
| 262 bool isMultitest = optionsFromFile["isMultitest"]; | 262 bool isMultitest = optionsFromFile["isMultitest"]; |
| 263 List<String> dartOptions = optionsFromFile["dartOptions"]; | 263 List<String> dartOptions = optionsFromFile["dartOptions"]; |
| 264 List<List<String>> vmOptionsList = optionsFromFile["vmOptions"]; | 264 List<List<String>> vmOptionsList = optionsFromFile["vmOptions"]; |
| 265 Expect.isTrue(!isMultitest || dartOptions == null); | 265 Expect.isTrue(!isMultitest || dartOptions == null); |
| 266 args.addAll(dartOptions == null ? [filename] : dartOptions); | 266 if (dartOptions == null) { |
| 267 args.add(filename); |
| 268 } else { |
| 269 var filename = dartOptions[0]; |
| 270 // TODO(ager): Get rid of this hack when the runtime checkout goes away. |
| 271 var file = new File(filename); |
| 272 if (!file.existsSync()) { |
| 273 filename = '../$filename'; |
| 274 Expect.isTrue(new File(filename).existsSync()); |
| 275 dartOptions[0] = filename; |
| 276 } |
| 277 args.addAll(dartOptions); |
| 278 } |
| 267 | 279 |
| 268 var result = new List<List<String>>(); | 280 var result = new List<List<String>>(); |
| 269 Expect.isFalse(vmOptionsList.isEmpty(), "empty vmOptionsList"); | 281 Expect.isFalse(vmOptionsList.isEmpty(), "empty vmOptionsList"); |
| 270 for (var vmOptions in vmOptionsList) { | 282 for (var vmOptions in vmOptionsList) { |
| 271 if (isMultitest) { | 283 if (isMultitest) { |
| 272 // Make copy of vmOptions, since we will modify it at each iteration. | 284 // Make copy of vmOptions, since we will modify it at each iteration. |
| 273 vmOptions = new List<String>.from(vmOptions); | 285 vmOptions = new List<String>.from(vmOptions); |
| 274 } | 286 } |
| 275 vmOptions.addAll(args); | 287 vmOptions.addAll(args); |
| 276 result.add(vmOptions); | 288 result.add(vmOptions); |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 args.add("--enable_leg"); | 398 args.add("--enable_leg"); |
| 387 } | 399 } |
| 388 if (configuration["component"] == "dartc") { | 400 if (configuration["component"] == "dartc") { |
| 389 if (configuration["mode"] == "release") { | 401 if (configuration["mode"] == "release") { |
| 390 args.add("--optimize"); | 402 args.add("--optimize"); |
| 391 } | 403 } |
| 392 } | 404 } |
| 393 return args; | 405 return args; |
| 394 } | 406 } |
| 395 } | 407 } |
| OLD | NEW |