| Index: tools/testing/dart/test_suite.dart
|
| ===================================================================
|
| --- tools/testing/dart/test_suite.dart (revision 25273)
|
| +++ tools/testing/dart/test_suite.dart (working copy)
|
| @@ -428,9 +428,11 @@
|
| final Path dartDir;
|
| Predicate<String> isTestFilePredicate;
|
| final bool listRecursively;
|
| + final extraVmOptions;
|
|
|
| static final RegExp multiTestRegExp = new RegExp(r"/// [0-9][0-9]:(.*)");
|
|
|
| +
|
| StandardTestSuite(Map configuration,
|
| String suiteName,
|
| Path suiteDirectory,
|
| @@ -440,7 +442,8 @@
|
| : super(configuration, suiteName),
|
| dartDir = TestUtils.dartDir(),
|
| listRecursively = recursive,
|
| - suiteDir = TestUtils.dartDir().join(suiteDirectory);
|
| + suiteDir = TestUtils.dartDir().join(suiteDirectory),
|
| + extraVmOptions = TestUtils.getExtraVmOptions(configuration);
|
|
|
| /**
|
| * Creates a test suite whose file organization matches an expected structure.
|
| @@ -736,8 +739,13 @@
|
| assert(!vmOptionsList.isEmpty);
|
|
|
| for (var vmOptions in vmOptionsList) {
|
| + var allVmOptions = vmOptions;
|
| + if (!extraVmOptions.isEmpty) {
|
| + allVmOptions = new List.from(vmOptions)..addAll(extraVmOptions);
|
| + }
|
| +
|
| doTest(new TestCase('$suiteName/$testName',
|
| - makeCommands(info, vmOptions, commonArguments),
|
| + makeCommands(info, allVmOptions, commonArguments),
|
| configuration,
|
| completeHandler,
|
| expectations,
|
| @@ -1245,7 +1253,7 @@
|
|
|
| bool isMultitest = optionsFromFile["isMultitest"];
|
| List<String> dartOptions = optionsFromFile["dartOptions"];
|
| - List<List<String>> vmOptionsList = getVmOptions(optionsFromFile);
|
| +
|
| assert(!isMultitest || dartOptions == null);
|
| if (dartOptions == null) {
|
| args.add(filePath.toNativePath());
|
| @@ -1468,6 +1476,7 @@
|
| RUNTIMES.contains(configuration['runtime']);
|
| if (!needsVmOptions) return [[]];
|
| final vmOptions = optionsFromFile['vmOptions'];
|
| +
|
| if (configuration['compiler'] != 'dart2dart') return vmOptions;
|
| // Temporary workaround for race in test suite: tests with different
|
| // vm options are still compiled into the same output file which
|
| @@ -1913,6 +1922,20 @@
|
| }
|
| return new Path(path);
|
| }
|
| +
|
| + /**
|
| + * Gets extra vm options 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;
|
| + }
|
| +
|
| +
|
| }
|
|
|
| class SummaryReport {
|
|
|