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

Unified Diff: tools/testing/dart/android.dart

Issue 2750403006: test.py: Push dart_precompiled_runtime and process_test once per device instead of once per test. (Closed)
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testing/dart/android.dart
diff --git a/tools/testing/dart/android.dart b/tools/testing/dart/android.dart
index 985f6bc99a7ba67b6313d82698b5f6a753ed5474..96ac6030ab16f79c05dee5588312028992d90ab3 100644
--- a/tools/testing/dart/android.dart
+++ b/tools/testing/dart/android.dart
@@ -193,6 +193,7 @@ class AndroidHelper {
class AdbDevice {
static const _adbServerStartupTime = const Duration(seconds: 3);
String _deviceId;
+ List<String> _cachedData = new List<String>();
String get deviceId => _deviceId;
@@ -248,6 +249,18 @@ class AdbDevice {
}
/**
+ * Upload data to the device only on first use of [remote].
+ */
+ Future pushCachedData(String local, String remote) {
+ if (_cachedData.contains(remote)) {
+ return new Future.value(new AdbCommandResult(
+ "Skipped cached push", "", "", 0, false));
+ }
+ _cachedData.add(remote);
+ return _adbCommand(['push', local, remote]);
kustermann 2017/03/19 17:11:05 This is not quite safe I think: It's possible to r
+ }
+
+ /**
* Change permission of directory recursively.
*/
Future chmod(String mode, Path directory) {
@@ -416,6 +429,7 @@ class AdbDevicePool {
'No android devices found. '
'Please make sure "adb devices" shows your device!');
}
+ print("Found ${devices.length} Android devices.");
return new AdbDevicePool(devices);
}
« no previous file with comments | « no previous file | tools/testing/dart/test_runner.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698