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. |