Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: tests/standalone/test_config.dart

Issue 8589020: Enable language and isolate tests using the dart test runner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/test_config.dart ('k') | tools/test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"]);
}
« no previous file with comments | « tests/language/test_config.dart ('k') | tools/test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698