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

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..423689a9290569fc707c3f795ba48127b747b604 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;
+ Map<String, String> _cachedData = new Map<String, String>();
String get deviceId => _deviceId;
@@ -248,6 +249,19 @@ class AdbDevice {
}
/**
+ * Upload data to the device, unless [local] is the same as the most recently
+ * used source for [remote].
+ */
+ Future pushCachedData(String local, String remote) {
+ if (_cachedData[remote] == local) {
+ return new Future.value(new AdbCommandResult(
+ "Skipped cached push", "", "", 0, false));
+ }
+ _cachedData[remote] = local;
+ return _adbCommand(['push', local, remote]);
+ }
+
+ /**
* Change permission of directory recursively.
*/
Future chmod(String mode, Path directory) {
@@ -416,6 +430,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