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

Side by Side Diff: tools/testing/dart/test_configurations.dart

Issue 2827793002: Format all files under tools and utils directory. (Closed)
Patch Set: Format all files under tools and utils directory. Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « tools/testing/dart/runtime_configuration.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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:convert'; 8 import 'dart:convert';
9 import 'dart:io'; 9 import 'dart:io';
10 import "dart:math" as math; 10 import "dart:math" as math;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 eventListener.add(new SummaryPrinter(jsonOnly: reportInJson)); 279 eventListener.add(new SummaryPrinter(jsonOnly: reportInJson));
280 } else { 280 } else {
281 eventListener.add(new ExitCodeSetter()); 281 eventListener.add(new ExitCodeSetter());
282 eventListener.add(new IgnoredTestMonitor()); 282 eventListener.add(new IgnoredTestMonitor());
283 } 283 }
284 284
285 // If any of the configurations need to access android devices we'll first 285 // If any of the configurations need to access android devices we'll first
286 // make a pool of all available adb devices. 286 // make a pool of all available adb devices.
287 AdbDevicePool adbDevicePool; 287 AdbDevicePool adbDevicePool;
288 bool needsAdbDevicePool = configurations.any((Map conf) { 288 bool needsAdbDevicePool = configurations.any((Map conf) {
289 return conf['runtime'] == 'dart_precompiled' && 289 return conf['runtime'] == 'dart_precompiled' && conf['system'] == 'android';
290 conf['system'] == 'android';
291 }); 290 });
292 if (needsAdbDevicePool) { 291 if (needsAdbDevicePool) {
293 adbDevicePool = await AdbDevicePool.create(); 292 adbDevicePool = await AdbDevicePool.create();
294 } 293 }
295 294
296 // Start all the HTTP servers required before starting the process queue. 295 // Start all the HTTP servers required before starting the process queue.
297 if (!serverFutures.isEmpty) { 296 if (!serverFutures.isEmpty) {
298 await Future.wait(serverFutures); 297 await Future.wait(serverFutures);
299 } 298 }
300 299
301 if (Platform.isWindows) { 300 if (Platform.isWindows) {
302 // When running tests on Windows, use cdb from depot_tools to dump 301 // When running tests on Windows, use cdb from depot_tools to dump
303 // stack traces of tests timing out. 302 // stack traces of tests timing out.
304 try { 303 try {
305 var text = 304 var text =
306 await new File(VS_TOOLCHAIN_FILE.toNativePath()).readAsString(); 305 await new File(VS_TOOLCHAIN_FILE.toNativePath()).readAsString();
307 firstConf['win_sdk_path'] = JSON.decode(text)['win_sdk']; 306 firstConf['win_sdk_path'] = JSON.decode(text)['win_sdk'];
308 } on dynamic { 307 } on dynamic {
309 // Ignore errors here. If win_sdk is not found, stack trace dumping 308 // Ignore errors here. If win_sdk is not found, stack trace dumping
310 // for timeouts won't work. 309 // for timeouts won't work.
311 } 310 }
312 } 311 }
313 312
314 // [firstConf] is needed here, since the ProcessQueue needs to know the 313 // [firstConf] is needed here, since the ProcessQueue needs to know the
315 // settings of 'noBatch' and 'local_ip' 314 // settings of 'noBatch' and 'local_ip'
316 new ProcessQueue( 315 new ProcessQueue(
317 firstConf, 316 firstConf,
318 maxProcesses, 317 maxProcesses,
319 maxBrowserProcesses, 318 maxBrowserProcesses,
320 startTime, 319 startTime,
321 testSuites, 320 testSuites,
322 eventListener, 321 eventListener,
323 allTestsFinished, 322 allTestsFinished,
324 verbose, 323 verbose,
325 recordingPath, 324 recordingPath,
326 recordingOutputPath, 325 recordingOutputPath,
327 adbDevicePool); 326 adbDevicePool);
328 } 327 }
OLDNEW
« no previous file with comments | « tools/testing/dart/runtime_configuration.dart ('k') | tools/testing/dart/test_options.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698