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 library test_configurations; | 5 library test_configurations; |
6 | 6 |
7 import "dart:async"; | 7 import "dart:async"; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import "dart:math" as math; | 9 import "dart:math" as math; |
10 | 10 |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 // browser. | 153 // browser. |
154 maxBrowserProcesses = 1; | 154 maxBrowserProcesses = 1; |
155 } else if (conf['runtime'].startsWith('safari')) { | 155 } else if (conf['runtime'].startsWith('safari')) { |
156 // Safari does not allow us to run from a fresh profile, so we can only | 156 // Safari does not allow us to run from a fresh profile, so we can only |
157 // use one browser. Additionally, you can not start two simulators | 157 // use one browser. Additionally, you can not start two simulators |
158 // for mobile safari simultainiously. | 158 // for mobile safari simultainiously. |
159 maxBrowserProcesses = 1; | 159 maxBrowserProcesses = 1; |
160 } else if (conf['runtime'] == 'chrome' && | 160 } else if (conf['runtime'] == 'chrome' && |
161 Platform.operatingSystem == 'macos') { | 161 Platform.operatingSystem == 'macos') { |
162 // Chrome on mac results in random timeouts. | 162 // Chrome on mac results in random timeouts. |
| 163 // Issue: https://github.com/dart-lang/sdk/issues/23891 |
| 164 // This change does not fix the problem. |
163 maxBrowserProcesses = math.max(1, maxBrowserProcesses ~/ 2); | 165 maxBrowserProcesses = math.max(1, maxBrowserProcesses ~/ 2); |
| 166 } else if (conf['runtime'] != 'drt') { |
| 167 // Even on machines with more than 16 processors, don't open more |
| 168 // than 15 browser instances, to avoid overloading the machine. |
| 169 // This is especially important when running locally on powerful |
| 170 // desktops. |
| 171 maxBrowserProcesses = math.min(maxBrowserProcesses, 15); |
164 } | 172 } |
165 | 173 |
166 // If we specifically pass in a suite only run that. | 174 // If we specifically pass in a suite only run that. |
167 if (conf['suite_dir'] != null) { | 175 if (conf['suite_dir'] != null) { |
168 var suite_path = new Path(conf['suite_dir']); | 176 var suite_path = new Path(conf['suite_dir']); |
169 testSuites.add(new PKGTestSuite(conf, suite_path)); | 177 testSuites.add(new PKGTestSuite(conf, suite_path)); |
170 } else { | 178 } else { |
171 for (String key in selectors.keys) { | 179 for (String key in selectors.keys) { |
172 if (key == 'co19') { | 180 if (key == 'co19') { |
173 testSuites.add(new Co19TestSuite(conf)); | 181 testSuites.add(new Co19TestSuite(conf)); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 recordingOutputPath); | 290 recordingOutputPath); |
283 } | 291 } |
284 | 292 |
285 // Start all the HTTP servers required before starting the process queue. | 293 // Start all the HTTP servers required before starting the process queue. |
286 if (serverFutures.isEmpty) { | 294 if (serverFutures.isEmpty) { |
287 startProcessQueue(); | 295 startProcessQueue(); |
288 } else { | 296 } else { |
289 Future.wait(serverFutures).then((_) => startProcessQueue()); | 297 Future.wait(serverFutures).then((_) => startProcessQueue()); |
290 } | 298 } |
291 } | 299 } |
OLD | NEW |