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

Unified Diff: tools/test.dart

Issue 15944005: Record/replay support to test.py (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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
« no previous file with comments | « tools/execute_recorded_testcases.py ('k') | tools/testing/dart/record_and_replay.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/test.dart
diff --git a/tools/test.dart b/tools/test.dart
index 089a721a813e77a74a5976daee063982a4259921..6f5103bb2cb6a91898a5117381e9499332a0b279 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -26,11 +26,12 @@ library test;
import "dart:async";
import "dart:io";
-import "testing/dart/test_runner.dart";
+import "testing/dart/http_server.dart";
+import "testing/dart/record_and_replay.dart";
import "testing/dart/test_options.dart";
-import "testing/dart/test_suite.dart";
import "testing/dart/test_progress.dart";
-import "testing/dart/http_server.dart";
+import "testing/dart/test_runner.dart";
+import "testing/dart/test_suite.dart";
import "testing/dart/utils.dart";
import "../compiler/tests/dartc/test_config.dart";
@@ -87,6 +88,27 @@ void testConfigurations(List<Map> configurations) {
var printTiming = firstConf['time'];
var listTests = firstConf['list'];
+ var recordingPath = firstConf['record_to_file'];
+ var recordingOutputPath = firstConf['replay_from_file'];
+
+ if (recordingPath != null && recordingOutputPath != null) {
+ print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'"
+ "at the same time. Exiting ...");
+ exit(1);
+ }
+
+ var testCaseRecorder;
+ if (recordingPath != null) {
+ testCaseRecorder = new TestCaseRecorder(new Path(recordingPath));
+ }
+
+ var testCaseOutputArchive;
+ if (recordingOutputPath != null) {
+ testCaseOutputArchive = new TestCaseOutputArchive();
+ testCaseOutputArchive.loadFromPath(new Path(recordingOutputPath));
+ }
+
+
if (!firstConf['append_logs']) {
var file = new File(TestUtils.flakyFileName());
if (file.existsSync()) {
@@ -216,6 +238,7 @@ void testConfigurations(List<Map> configurations) {
}
eventListener.add(new ExitCodeSetter());
+
void startProcessQueue() {
// Start process queue.
new ProcessQueue(maxProcesses,
@@ -225,7 +248,9 @@ void testConfigurations(List<Map> configurations) {
eventListener,
allTestsFinished,
verbose,
- listTests);
+ listTests,
+ testCaseRecorder,
+ testCaseOutputArchive);
}
// Start all the HTTP servers required before starting the process queue.
« no previous file with comments | « tools/execute_recorded_testcases.py ('k') | tools/testing/dart/record_and_replay.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698