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

Unified Diff: tests/standalone/test_config.dart

Issue 8514003: tools/test.dart: Read test expectations from the status file, and pass them to the test runner. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Readdress comments. 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/standalone/src/TestRunnerTest.dart ('k') | tools/testing/dart/status_file_parser.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 7a8c2806ca0aa5de49f4a2a64f7348d54d883d02..2d3b989ea11ccfb173a713617ce118d1df1d4e29 100644
--- a/tests/standalone/test_config.dart
+++ b/tests/standalone/test_config.dart
@@ -14,19 +14,25 @@ class StandaloneTestSuite {
Function doDone;
String shellPath;
String pathSeparator;
+ Map<String, String> configuration;
+ TestExpectationsMap testExpectationsMap;
StandaloneTestSuite() {
shellPath = getDartShellFileName() ;
pathSeparator = new Platform().pathSeparator();
+ configuration = {"mode": "debug",
+ "arch": "ia32",
+ "checked": "true",
+ "component": "vm",
+ "system": new Platform().operatingSystem()};
}
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);
+ // Read test expectations from status file.
+ testExpectationsMap = ReadTestExpectations(statusFilePath, configuration);
processDirectory();
}
@@ -44,20 +50,33 @@ class StandaloneTestSuite {
void processFile(String filename) {
if (!filename.endsWith("Test.dart")) return;
+
+ Expect.isTrue(filename.contains(directoryPath));
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.
+ Set<String> expectations = testExpectationsMap.expectations(testName);
+
+ // TODO(whesse): Skip files with internal directives, and multipart files,
+ // until they are handled correctly.
+ if (expectations.contains(SKIP)) return;
+
+
doTest(new TestCase(testName,
shellPath,
<String>["--enable_type_checks",
"--ignore-unrecognized-flags",
filename ],
completeHandler,
- new Set.from([PASS, FAIL, CRASH, TIMEOUT])));
+ expectations));
}
void completeHandler(TestCase testCase) {
TestOutput output = testCase.output;
- print("Exit code: ${output.exitCode} Time: ${output.time}");
+ String expected = "";
+ testCase.expectedOutcomes.forEach((value) { expected += value + " "; });
+ print("");
+ print(testCase.displayName);
+ print(" Result:${output.result} Expected:$expected");
+ print(" Exit code: ${output.exitCode} Time: ${output.time}");
}
}
« no previous file with comments | « tests/standalone/src/TestRunnerTest.dart ('k') | tools/testing/dart/status_file_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698