| Index: tests/standalone/test_config.dart
|
| diff --git a/tests/standalone/test_config.dart b/tests/standalone/test_config.dart
|
| index c09e01aed7a8d513b433abc13ad88b18c756c6f2..ecaa67ec105220d20b43997ccb516e661a7a90cc 100644
|
| --- a/tests/standalone/test_config.dart
|
| +++ b/tests/standalone/test_config.dart
|
| @@ -61,10 +61,12 @@ class StandaloneTestSuite {
|
| if (configuration["component"] == "leg") {
|
| args.add("--enable_leg");
|
| }
|
| - args.add(filename);
|
|
|
| + var optionsFromFile = testOptions(filename);
|
| + List<List<String>> optionsList = optionsFromFile["vmOptions"];
|
| + List<String> dartOptions = optionsFromFile["dartOptions"];
|
| + args.addAll(dartOptions == null ? [filename] : dartOptions);
|
|
|
| - List<List> optionsList = testOptions(filename);
|
| if (optionsList.isEmpty()) {
|
| doTest(new TestCase(testName,
|
| shellPath,
|
| @@ -85,21 +87,32 @@ class StandaloneTestSuite {
|
| }
|
| }
|
|
|
| - List<List> testOptions(String filename) {
|
| + Map testOptions(String filename) {
|
| RegExp testOptionsRegExp = const RegExp(@"// VMOptions=(.*)");
|
| + RegExp dartOptionsRegExp = const RegExp(@"// DartOptions=(.*)");
|
| File file = new File(filename);
|
| FileInputStream fileStream = file.openInputStream();
|
| StringInputStream lines = new StringInputStream(fileStream);
|
|
|
| List<List> result = new List<List>();
|
| + List<String> dartOptions;
|
| String line;
|
| while ((line = lines.readLine()) != null) {
|
| Match match = testOptionsRegExp.firstMatch(line);
|
| if (match != null) {
|
| result.add(match[1].split(' ').filter((e) => e != ''));
|
| }
|
| +
|
| + match = dartOptionsRegExp.firstMatch(line);
|
| + if (match != null) {
|
| + if (dartOptions != null) {
|
| + throw new Exception(
|
| + 'More than one "// DartOptions=" line in test $filename');
|
| + }
|
| + dartOptions = match[1].split(' ').filter((e) => e != '');
|
| + }
|
| }
|
| - return result;
|
| + return {"vmOptions": result, "dartOptions": dartOptions};
|
| }
|
|
|
| void completeHandler(TestCase testCase) {
|
|
|