From a439f7504ef754409b89678ca7cb81e9e9308968 Mon Sep 17 00:00:00 2001 From: Ian Fischer Date: Thu, 28 May 2015 17:41:49 -0700 Subject: [PATCH] Cache .so files for debugging per device and don't redownload .so's that are in your cache BUG= R=eseidel@chromium.org, eseidel Review URL: https://codereview.chromium.org/1158493005 --- engine/src/flutter/tools/android_library_cacher.py | 2 ++ engine/src/flutter/tools/skydb | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/src/flutter/tools/android_library_cacher.py b/engine/src/flutter/tools/android_library_cacher.py index 564448a050..a0813979ee 100755 --- a/engine/src/flutter/tools/android_library_cacher.py +++ b/engine/src/flutter/tools/android_library_cacher.py @@ -57,6 +57,8 @@ def main(): dest_dir = os.path.dirname(dest_file) if not os.path.exists(dest_dir): os.makedirs(dest_dir) + if os.path.exists(dest_file): + continue print '%s -> %s' % (library_path, dest_file) pull_cmd = [ADB_PATH, 'pull', library_path, dest_file] subprocess.check_call(pull_cmd, stderr=dev_null) diff --git a/engine/src/flutter/tools/skydb b/engine/src/flutter/tools/skydb index e99509d762..1a52855603 100755 --- a/engine/src/flutter/tools/skydb +++ b/engine/src/flutter/tools/skydb @@ -37,7 +37,8 @@ ANDROID_APK_NAME = 'MojoShell.apk' PID_FILE_PATH = "/tmp/skydb.pids" CACHE_LINKS_PATH = '/tmp/mojo_cache_links' -SYSTEM_LIBS_ROOT_PATH = '/tmp/device_libs' +# TODO(iansf): Fix undefined behavior when you have more than one device attached. +SYSTEM_LIBS_ROOT_PATH = '/tmp/device_libs/%s' % (subprocess.check_output(['adb', 'get-serialno']).strip()) SRC_ROOT = skypy.paths.Paths('ignored').src_root ADB_PATH = os.path.join(SRC_ROOT,