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(); |
+ } |
Bill Hesse
2016/04/27 12:22:32
We have code for awaiting the AdbDevices in browse
kustermann
2016/04/27 13:25:09
I'd really prefer not to modify any unrelated code
|
+ |
// [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()); |
Bill Hesse
2016/04/27 12:22:32
This should just be:
if (serverFutures.isNotEmpty
|
} |
} |