| Index: tests/standalone/test_config.dart
|
| diff --git a/tests/standalone/test_config.dart b/tests/standalone/test_config.dart
|
| index 71ced2f9a3dbdc531b3d40ef77eb2e40ad3d4d61..8cfc9831f538815d48daa7930df2f6fd5613216a 100644
|
| --- a/tests/standalone/test_config.dart
|
| +++ b/tests/standalone/test_config.dart
|
| @@ -4,80 +4,11 @@
|
|
|
| #library("standalone_test_config");
|
|
|
| -#import("../../tools/testing/dart/status_file_parser.dart");
|
| -#import("../../tools/testing/dart/test_config_utils.dart");
|
| -#import("../../tools/testing/dart/test_runner.dart");
|
| +#import("../../tools/testing/dart/test_suite.dart");
|
|
|
| -class StandaloneTestSuite {
|
| - String directoryPath = "tests/standalone/src";
|
| - final String statusFilePath = "tests/standalone/standalone.status";
|
| - Function doTest;
|
| - Function doDone;
|
| - String shellPath;
|
| - String pathSeparator;
|
| - Map configuration;
|
| - TestExpectations testExpectations;
|
| -
|
| - StandaloneTestSuite(Map this.configuration) {
|
| - shellPath = getDartShellFileName(configuration) ;
|
| - pathSeparator = new Platform().pathSeparator();
|
| - }
|
| -
|
| - void forEachTest(Function onTest, [Function onDone = null]) {
|
| - doTest = onTest;
|
| - doDone = (ignore) => onDone();
|
| -
|
| - // Read test expectations from status file.
|
| - testExpectations = new TestExpectations();
|
| - ReadTestExpectationsInto(testExpectations, statusFilePath, configuration);
|
| -
|
| - processDirectory();
|
| - }
|
| -
|
| - void processDirectory() {
|
| - directoryPath = getDirname(directoryPath);
|
| - Directory dir = new Directory(directoryPath);
|
| - dir.errorHandler = (s) {
|
| - throw s;
|
| - };
|
| - dir.fileHandler = processFile;
|
| - dir.doneHandler = doDone;
|
| - dir.list(false);
|
| - }
|
| -
|
| - void processFile(String filename) {
|
| - if (!filename.endsWith("Test.dart")) return;
|
| -
|
| - // If patterns are given only list the files that match one of the
|
| - // patterns.
|
| - var patterns = configuration['patterns'];
|
| - if (!patterns.isEmpty() &&
|
| - !patterns.some((re) => re.hasMatch(filename))) {
|
| - return;
|
| - }
|
| -
|
| - int start = filename.lastIndexOf(pathSeparator);
|
| - String testName = filename.substring(start + 1, filename.length - 5);
|
| - Set<String> expectations = testExpectations.expectations(testName);
|
| -
|
| - if (expectations.contains(SKIP)) return;
|
| -
|
| - var optionsFromFile = TestUtils.optionsFromFile(filename, configuration);
|
| - var argumentLists =
|
| - TestUtils.argumentLists(filename, optionsFromFile, configuration);
|
| - for (var args in argumentLists) {
|
| - var timeout = configuration['timeout'];
|
| - var isNegative = optionsFromFile['isNegative'];
|
| - doTest(new TestCase(testName,
|
| - shellPath,
|
| - args,
|
| - timeout,
|
| - completeHandler,
|
| - expectations,
|
| - isNegative));
|
| - }
|
| - }
|
| -
|
| - void completeHandler(TestCase testCase) {
|
| - }
|
| +class StandaloneTestSuite extends StandardTestSuite {
|
| + StandaloneTestSuite(Map configuration)
|
| + : super(configuration,
|
| + "tests/standalone/src",
|
| + ["tests/standalone/standalone.status"]);
|
| }
|
|
|