| Index: tools/testing/dart/test_configurations.dart
|
| diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
|
| index ff482734681a67899028ad8e21647f1e3916090e..0acb44c468c466ff7e498a7ff4a38b99ccbde632 100644
|
| --- a/tools/testing/dart/test_configurations.dart
|
| +++ b/tools/testing/dart/test_configurations.dart
|
| @@ -8,6 +8,7 @@ import "dart:async";
|
| import 'dart:io';
|
| import "dart:math" as math;
|
|
|
| +import 'android.dart';
|
| import "browser_controller.dart";
|
| import "co19_test_config.dart";
|
| import "http_server.dart";
|
| @@ -49,7 +50,7 @@ final TEST_SUITE_DIRECTORIES = [
|
| new Path('utils/tests/peg'),
|
| ];
|
|
|
| -void testConfigurations(List<Map> configurations) {
|
| +Future testConfigurations(List<Map> configurations) async {
|
| var startTime = new DateTime.now();
|
| // Extract global options from first configuration.
|
| var firstConf = configurations[0];
|
| @@ -281,7 +282,17 @@ void testConfigurations(List<Map> configurations) {
|
| eventListener.add(new ExitCodeSetter());
|
| }
|
|
|
| - void startProcessQueue() {
|
| + Future startProcessQueue() async {
|
| + AdbDevicePool pool;
|
| +
|
| + bool needsAdbDevicePool = configurations.any((Map conf) {
|
| + return conf['runtime'] == 'dart_precompiled' &&
|
| + conf['system'] == 'android';
|
| + });
|
| + if (needsAdbDevicePool) {
|
| + pool = await AdbDevicePool.create();
|
| + }
|
| +
|
| // [firstConf] is needed here, since the ProcessQueue needs to know the
|
| // settings of 'noBatch' and 'local_ip'
|
| new ProcessQueue(
|
| @@ -294,13 +305,14 @@ void testConfigurations(List<Map> configurations) {
|
| allTestsFinished,
|
| verbose,
|
| recordingPath,
|
| - recordingOutputPath);
|
| + recordingOutputPath,
|
| + pool);
|
| }
|
|
|
| // Start all the HTTP servers required before starting the process queue.
|
| if (serverFutures.isEmpty) {
|
| - startProcessQueue();
|
| + await startProcessQueue();
|
| } else {
|
| - Future.wait(serverFutures).then((_) => startProcessQueue());
|
| + await Future.wait(serverFutures).then((_) => startProcessQueue());
|
| }
|
| }
|
|
|