Chromium Code Reviews| 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:convert'; | |
| 8 import 'dart:io'; | 9 import 'dart:io'; |
| 9 import "dart:math" as math; | 10 import "dart:math" as math; |
| 10 | 11 |
| 11 import 'android.dart'; | 12 import 'android.dart'; |
| 12 import "browser_controller.dart"; | 13 import "browser_controller.dart"; |
| 13 import "co19_test_config.dart"; | 14 import "co19_test_config.dart"; |
| 14 import "http_server.dart"; | 15 import "http_server.dart"; |
| 15 import "path.dart"; | 16 import "path.dart"; |
| 16 import "test_progress.dart"; | 17 import "test_progress.dart"; |
| 17 import "test_runner.dart"; | 18 import "test_runner.dart"; |
| (...skipping 29 matching lines...) Expand all Loading... | |
| 47 new Path('tests/language'), | 48 new Path('tests/language'), |
| 48 new Path('tests/language_strong'), | 49 new Path('tests/language_strong'), |
| 49 new Path('tests/lib'), | 50 new Path('tests/lib'), |
| 50 new Path('tests/lib_strong'), | 51 new Path('tests/lib_strong'), |
| 51 new Path('tests/standalone'), | 52 new Path('tests/standalone'), |
| 52 new Path('tests/utils'), | 53 new Path('tests/utils'), |
| 53 new Path('utils/tests/css'), | 54 new Path('utils/tests/css'), |
| 54 new Path('utils/tests/peg'), | 55 new Path('utils/tests/peg'), |
| 55 ]; | 56 ]; |
| 56 | 57 |
| 58 // This file is created by gclient runhooks. | |
| 59 final VS_TOOLCHAIN_FILE = new Path("build/win_toolchain.json"); | |
| 60 | |
| 57 Future testConfigurations(List<Map> configurations) async { | 61 Future testConfigurations(List<Map> configurations) async { |
| 58 var startTime = new DateTime.now(); | 62 var startTime = new DateTime.now(); |
| 59 // Extract global options from first configuration. | 63 // Extract global options from first configuration. |
| 60 var firstConf = configurations[0]; | 64 var firstConf = configurations[0]; |
| 61 var maxProcesses = firstConf['tasks']; | 65 var maxProcesses = firstConf['tasks']; |
| 62 var progressIndicator = firstConf['progress']; | 66 var progressIndicator = firstConf['progress']; |
| 63 BuildbotProgressIndicator.stepName = firstConf['step_name']; | 67 BuildbotProgressIndicator.stepName = firstConf['step_name']; |
| 64 var verbose = firstConf['verbose']; | 68 var verbose = firstConf['verbose']; |
| 65 var printTiming = firstConf['time']; | 69 var printTiming = firstConf['time']; |
| 66 var listTests = firstConf['list']; | 70 var listTests = firstConf['list']; |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 }); | 291 }); |
| 288 if (needsAdbDevicePool) { | 292 if (needsAdbDevicePool) { |
| 289 adbDevicePool = await AdbDevicePool.create(); | 293 adbDevicePool = await AdbDevicePool.create(); |
| 290 } | 294 } |
| 291 | 295 |
| 292 // Start all the HTTP servers required before starting the process queue. | 296 // Start all the HTTP servers required before starting the process queue. |
| 293 if (!serverFutures.isEmpty) { | 297 if (!serverFutures.isEmpty) { |
| 294 await Future.wait(serverFutures); | 298 await Future.wait(serverFutures); |
| 295 } | 299 } |
| 296 | 300 |
| 301 if (Platform.isWindows) { | |
| 302 // When running tests on Windows, use cdb from depot_tools to dump | |
| 303 // stack traces of tests timing out. | |
|
Bill Hesse
2017/03/01 13:45:56
It would be good to put this in a try block, so it
Florian Schneider
2017/03/02 22:56:08
I'll add one here.
| |
| 304 var text = await new File(VS_TOOLCHAIN_FILE.toNativePath()).readAsString(); | |
| 305 firstConf['win_sdk_path'] = JSON.decode(text)['win_sdk']; | |
| 306 } | |
| 307 | |
| 297 // [firstConf] is needed here, since the ProcessQueue needs to know the | 308 // [firstConf] is needed here, since the ProcessQueue needs to know the |
| 298 // settings of 'noBatch' and 'local_ip' | 309 // settings of 'noBatch' and 'local_ip' |
| 299 new ProcessQueue( | 310 new ProcessQueue( |
| 300 firstConf, | 311 firstConf, |
| 301 maxProcesses, | 312 maxProcesses, |
| 302 maxBrowserProcesses, | 313 maxBrowserProcesses, |
| 303 startTime, | 314 startTime, |
| 304 testSuites, | 315 testSuites, |
| 305 eventListener, | 316 eventListener, |
| 306 allTestsFinished, | 317 allTestsFinished, |
| 307 verbose, | 318 verbose, |
| 308 recordingPath, | 319 recordingPath, |
| 309 recordingOutputPath, | 320 recordingOutputPath, |
| 310 adbDevicePool); | 321 adbDevicePool); |
| 311 } | 322 } |
| OLD | NEW |