OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'dart:io'; | 6 import 'dart:io'; |
7 import 'dart:math' as math; | 7 import 'dart:math' as math; |
8 | 8 |
9 import 'android.dart'; | 9 import 'android.dart'; |
10 import 'browser_controller.dart'; | 10 import 'browser_controller.dart'; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // Extract global options from first configuration. | 60 // Extract global options from first configuration. |
61 var firstConf = configurations[0]; | 61 var firstConf = configurations[0]; |
62 var maxProcesses = firstConf.taskCount; | 62 var maxProcesses = firstConf.taskCount; |
63 var progressIndicator = firstConf.progress; | 63 var progressIndicator = firstConf.progress; |
64 BuildbotProgressIndicator.stepName = firstConf.stepName; | 64 BuildbotProgressIndicator.stepName = firstConf.stepName; |
65 var verbose = firstConf.isVerbose; | 65 var verbose = firstConf.isVerbose; |
66 var printTiming = firstConf.printTiming; | 66 var printTiming = firstConf.printTiming; |
67 var listTests = firstConf.listTests; | 67 var listTests = firstConf.listTests; |
68 | 68 |
69 var reportInJson = firstConf.reportInJson; | 69 var reportInJson = firstConf.reportInJson; |
70 var recordingPath = firstConf.recordingPath; | |
71 var replayPath = firstConf.replayPath; | |
72 | 70 |
73 Browser.resetBrowserConfiguration = firstConf.resetBrowser; | 71 Browser.resetBrowserConfiguration = firstConf.resetBrowser; |
74 | 72 |
75 if (recordingPath != null && replayPath != null) { | |
76 print("Fatal: Can't have the '--record_to_file' and '--replay_from_file'" | |
77 "at the same time. Exiting ..."); | |
78 exit(1); | |
79 } | |
80 | |
81 if (!firstConf.appendLogs) { | 73 if (!firstConf.appendLogs) { |
82 var files = [ | 74 var files = [ |
83 new File(TestUtils.flakyFileName), | 75 new File(TestUtils.flakyFileName), |
84 new File(TestUtils.testOutcomeFileName) | 76 new File(TestUtils.testOutcomeFileName) |
85 ]; | 77 ]; |
86 for (var file in files) { | 78 for (var file in files) { |
87 if (file.existsSync()) { | 79 if (file.existsSync()) { |
88 file.deleteSync(); | 80 file.deleteSync(); |
89 } | 81 } |
90 } | 82 } |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 adbDevicePool = await AdbDevicePool.create(); | 254 adbDevicePool = await AdbDevicePool.create(); |
263 } | 255 } |
264 | 256 |
265 // Start all the HTTP servers required before starting the process queue. | 257 // Start all the HTTP servers required before starting the process queue. |
266 if (!serverFutures.isEmpty) { | 258 if (!serverFutures.isEmpty) { |
267 await Future.wait(serverFutures); | 259 await Future.wait(serverFutures); |
268 } | 260 } |
269 | 261 |
270 // [firstConf] is needed here, since the ProcessQueue needs to know the | 262 // [firstConf] is needed here, since the ProcessQueue needs to know the |
271 // settings of 'noBatch' and 'local_ip' | 263 // settings of 'noBatch' and 'local_ip' |
272 new ProcessQueue( | 264 new ProcessQueue(firstConf, maxProcesses, maxBrowserProcesses, startTime, |
273 firstConf, | 265 testSuites, eventListener, allTestsFinished, verbose, adbDevicePool); |
274 maxProcesses, | |
275 maxBrowserProcesses, | |
276 startTime, | |
277 testSuites, | |
278 eventListener, | |
279 allTestsFinished, | |
280 verbose, | |
281 recordingPath, | |
282 replayPath, | |
283 adbDevicePool); | |
284 } | 266 } |
OLD | NEW |