| Index: tests/standalone/test_config.dart
|
| diff --git a/tests/standalone/test_config.dart b/tests/standalone/test_config.dart
|
| index 0cff4b92d0518727066e29787882000425ac12c1..c09e01aed7a8d513b433abc13ad88b18c756c6f2 100644
|
| --- a/tests/standalone/test_config.dart
|
| +++ b/tests/standalone/test_config.dart
|
| @@ -63,12 +63,43 @@ class StandaloneTestSuite {
|
| }
|
| args.add(filename);
|
|
|
| - doTest(new TestCase(testName,
|
| - shellPath,
|
| - args,
|
| - configuration["timeout"],
|
| - completeHandler,
|
| - expectations));
|
| +
|
| + List<List> optionsList = testOptions(filename);
|
| + if (optionsList.isEmpty()) {
|
| + doTest(new TestCase(testName,
|
| + shellPath,
|
| + args,
|
| + configuration["timeout"],
|
| + completeHandler,
|
| + expectations));
|
| + } else {
|
| + for (var options in optionsList) {
|
| + options.addAll(args);
|
| + doTest(new TestCase(testName,
|
| + shellPath,
|
| + options,
|
| + configuration["timeout"],
|
| + completeHandler,
|
| + expectations));
|
| + }
|
| + }
|
| + }
|
| +
|
| + List<List> testOptions(String filename) {
|
| + RegExp testOptionsRegExp = const RegExp(@"// VMOptions=(.*)");
|
| + File file = new File(filename);
|
| + FileInputStream fileStream = file.openInputStream();
|
| + StringInputStream lines = new StringInputStream(fileStream);
|
| +
|
| + List<List> result = new List<List>();
|
| + String line;
|
| + while ((line = lines.readLine()) != null) {
|
| + Match match = testOptionsRegExp.firstMatch(line);
|
| + if (match != null) {
|
| + result.add(match[1].split(' ').filter((e) => e != ''));
|
| + }
|
| + }
|
| + return result;
|
| }
|
|
|
| void completeHandler(TestCase testCase) {
|
|
|