| Index: tests/standalone/test_config.dart
|
| diff --git a/tests/standalone/test_config.dart b/tests/standalone/test_config.dart
|
| index 170de26c172f5dda8f9a80ab0b35ea52e94f979a..837285c0c8cec677ef855c39e44133824a8fb3ab 100644
|
| --- a/tests/standalone/test_config.dart
|
| +++ b/tests/standalone/test_config.dart
|
| @@ -5,9 +5,11 @@
|
| #library("standalone_test_config");
|
|
|
| #import("../../tools/testing/dart/test_runner.dart");
|
| +#import("../../tools/testing/dart/status_file_parser.dart");
|
|
|
| class StandaloneTestSuite {
|
| - final String directoryPath = "tests/standalone/src";
|
| + String directoryPath = "tests/standalone/src";
|
| + final String statusFilePath = "tests/standalone/standalone.status";
|
| Function doTest;
|
| Function doDone;
|
| String shellPath;
|
| @@ -21,35 +23,37 @@ class StandaloneTestSuite {
|
| void forEachTest(Function onTest, [Function onDone = null]) {
|
| doTest = onTest;
|
| doDone = onDone;
|
| +
|
| + // Read configuration from status file.
|
| + List<Section> sections = new List<Section>();
|
| + ReadConfigurationInto(statusFilePath, sections);
|
| +
|
| processDirectory();
|
| }
|
|
|
| void processDirectory() {
|
| + directoryPath = getDirname(directoryPath);
|
| Directory dir = new Directory(directoryPath);
|
| - if (!dir.existsSync()) {
|
| - dir = new Directory(".." + pathSeparator + directoryPath);
|
| - Expect.isTrue(dir.existsSync(),
|
| - "Cannot find tests/corelib/src or ../tests/corelib/src");
|
| + Expect.isTrue(dir.existsSync(),
|
| + "Cannot find tests/standalone/src or ../tests/standalone/src");
|
| // TODO(ager): Use dir.errorHandler instead when it is implemented.
|
| - }
|
| dir.fileHandler = processFile;
|
| dir.doneHandler = doDone;
|
| dir.list(false);
|
| }
|
|
|
| void processFile(String filename) {
|
| - if (filename.endsWith("Test.dart")) {
|
| - int start = filename.lastIndexOf(pathSeparator);
|
| - String displayName = filename.substring(start + 1, filename.length - 5);
|
| - // TODO(whesse): Gather test case info from status file and test file.
|
| - doTest(new TestCase(displayName,
|
| - shellPath,
|
| - <String>["--enable_type_checks",
|
| - "--ignore-unrecognized-flags",
|
| - filename ],
|
| - completeHandler,
|
| - new Set.from([PASS, FAIL, CRASH, TIMEOUT])));
|
| - }
|
| + if (!filename.endsWith("Test.dart")) return;
|
| + int start = filename.lastIndexOf(pathSeparator);
|
| + String testName = filename.substring(start + 1, filename.length - 5);
|
| + // TODO(whesse): Gather test case info from status file and test file.
|
| + doTest(new TestCase(testName,
|
| + shellPath,
|
| + <String>["--enable_type_checks",
|
| + "--ignore-unrecognized-flags",
|
| + filename ],
|
| + completeHandler,
|
| + new Set.from([PASS, FAIL, CRASH, TIMEOUT])));
|
| }
|
|
|
| void completeHandler(TestCase testCase) {
|
|
|