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

Unified Diff: utils/testrunner/layout_test_controller.dart

Issue 10977069: New testrunner that runs the test pipleine in an isolate. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months 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
Index: utils/testrunner/layout_test_controller.dart
===================================================================
--- utils/testrunner/layout_test_controller.dart (revision 13085)
+++ utils/testrunner/layout_test_controller.dart (working copy)
@@ -16,6 +16,9 @@
/** Whether to output test summary. */
bool summarize;
+/** Whether to print results immediately as they come in. */
+bool immediate;
+
/** Format strings to use for test result messages. */
String passFormat, failFormat, errorFormat, listFormat;
@@ -28,14 +31,16 @@
/** URL of the child test file. */
String baseUrl;
+/** The print function to use. */
+Function tprint;
+
+/** A callback function to notify the caller we are done. */
+Function notifyDone;
+
// Variable below here are local to this file.
var passCount = 0, failCount = 0, errorCount = 0;
Date start;
-void tprint(msg) {
- print('###$msg');
-}
-
class Macros {
static const String testTime = '<TIME>';
static const String testfile = '<FILENAME>';
@@ -113,7 +118,7 @@
if (summarize) {
printSummary(testfile, passCount, failCount, errorCount);
}
- exit(failCount > 0 ? -1 : 0);
+ notifyDone(failCount > 0 ? -1 : 0);
}
runTextLayoutTest(testNum) {
@@ -282,3 +287,27 @@
}
};
}
+
+void init() {
+ // Get the name of the directory that has the expectation files
+ // (by stripping .dart suffix from test file path).
+ // Create it if it does not exist.
+ sourceDir = testfile.substring(0, testfile.length - 5);
+ if (regenerate) {
+ var d = new Directory(sourceDir);
+ if (!d.existsSync()) {
+ d.createSync();
+ }
+ }
+}
+
+void runPixelLayoutTests() {
+ init();
+ runPixelLayoutTest(0);
+}
+
+void runTextLayoutTests() {
+ init();
+ runTextLayoutTest(0);
+}
+

Powered by Google App Engine
This is Rietveld 408576698