Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env dart | 1 #!/usr/bin/env dart |
| 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
| 3 // for details. All rights reserved. Use of this source code is governed by a | 3 // for details. All rights reserved. Use of this source code is governed by a |
| 4 // BSD-style license that can be found in the LICENSE file. | 4 // BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 /** | 6 /** |
| 7 * This file is the entrypoint of the dart test suite. This suite is used | 7 * This file is the entrypoint of the dart test suite. This suite is used |
| 8 * to test: | 8 * to test: |
| 9 * | 9 * |
| 10 * 1. the dart vm | 10 * 1. the dart vm |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 // We set a special flag in the safari browser if we need to clear out | 96 // We set a special flag in the safari browser if we need to clear out |
| 97 // the cache before running. | 97 // the cache before running. |
| 98 Safari.deleteCache = firstConf['clear_safari_cache']; | 98 Safari.deleteCache = firstConf['clear_safari_cache']; |
| 99 | 99 |
| 100 if (recordingPath != null && recordingOutputPath != null) { | 100 if (recordingPath != null && recordingOutputPath != null) { |
| 101 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" | 101 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" |
| 102 "at the same time. Exiting ..."); | 102 "at the same time. Exiting ..."); |
| 103 exit(1); | 103 exit(1); |
| 104 } | 104 } |
| 105 | 105 |
| 106 var testCaseRecorder; | |
| 107 if (recordingPath != null) { | |
| 108 testCaseRecorder = new TestCaseRecorder(new Path(recordingPath)); | |
| 109 } | |
| 110 | |
| 111 var testCaseOutputArchive; | |
| 112 if (recordingOutputPath != null) { | |
| 113 testCaseOutputArchive = new TestCaseOutputArchive(); | |
| 114 testCaseOutputArchive.loadFromPath(new Path(recordingOutputPath)); | |
| 115 } | |
| 116 | |
| 117 | |
| 118 if (!firstConf['append_logs']) { | 106 if (!firstConf['append_logs']) { |
| 119 var file = new File(TestUtils.flakyFileName()); | 107 var file = new File(TestUtils.flakyFileName()); |
| 120 if (file.existsSync()) { | 108 if (file.existsSync()) { |
| 121 file.deleteSync(); | 109 file.deleteSync(); |
| 122 } | 110 } |
| 123 } | 111 } |
| 124 | 112 |
| 125 DebugLogger.init(firstConf['write_debug_log'] ? | 113 DebugLogger.init(firstConf['write_debug_log'] ? |
| 126 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); | 114 TestUtils.debugLogfile() : null, append: firstConf['append_logs']); |
| 127 | 115 |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 244 if (printTiming) { | 232 if (printTiming) { |
| 245 eventListener.add(new TimingPrinter(startTime)); | 233 eventListener.add(new TimingPrinter(startTime)); |
| 246 } | 234 } |
| 247 eventListener.add(new SkippedCompilationsPrinter()); | 235 eventListener.add(new SkippedCompilationsPrinter()); |
| 248 eventListener.add(new LeftOverTempDirPrinter()); | 236 eventListener.add(new LeftOverTempDirPrinter()); |
| 249 } | 237 } |
| 250 eventListener.add(new ExitCodeSetter()); | 238 eventListener.add(new ExitCodeSetter()); |
| 251 | 239 |
| 252 void startProcessQueue() { | 240 void startProcessQueue() { |
| 253 // Start process queue. | 241 // Start process queue. |
| 254 new ProcessQueue(maxProcesses, | 242 new ProcessQueue(firstConf, |
|
ricow1
2013/08/01 18:23:52
it seems a little odd to pass in the first conf, b
kustermann
2013/08/05 07:29:17
This is actually not odd. Strictly speaking, our c
| |
| 243 maxProcesses, | |
| 255 maxBrowserProcesses, | 244 maxBrowserProcesses, |
| 256 startTime, | 245 startTime, |
| 257 testSuites, | 246 testSuites, |
| 258 eventListener, | 247 eventListener, |
| 259 allTestsFinished, | 248 allTestsFinished, |
| 260 verbose, | 249 verbose, |
| 261 listTests, | 250 listTests, |
| 262 testCaseRecorder, | 251 recordingPath, |
| 263 testCaseOutputArchive); | 252 recordingOutputPath); |
| 264 } | 253 } |
| 265 | 254 |
| 266 // Start all the HTTP servers required before starting the process queue. | 255 // Start all the HTTP servers required before starting the process queue. |
| 267 if (serverFutures.isEmpty) { | 256 if (serverFutures.isEmpty) { |
| 268 startProcessQueue(); | 257 startProcessQueue(); |
| 269 } else { | 258 } else { |
| 270 Future.wait(serverFutures).then((_) => startProcessQueue()); | 259 Future.wait(serverFutures).then((_) => startProcessQueue()); |
| 271 } | 260 } |
| 272 } | 261 } |
| 273 | 262 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 312 void main() { | 301 void main() { |
| 313 deleteTemporaryDartDirectories().then((_) { | 302 deleteTemporaryDartDirectories().then((_) { |
| 314 var optionsParser = new TestOptionsParser(); | 303 var optionsParser = new TestOptionsParser(); |
| 315 var configurations = optionsParser.parse(new Options().arguments); | 304 var configurations = optionsParser.parse(new Options().arguments); |
| 316 if (configurations != null && configurations.length > 0) { | 305 if (configurations != null && configurations.length > 0) { |
| 317 testConfigurations(configurations); | 306 testConfigurations(configurations); |
| 318 } | 307 } |
| 319 }); | 308 }); |
| 320 } | 309 } |
| 321 | 310 |
| OLD | NEW |