deploy_chrome: Warn if rsync is not found on the device
When rsync is not installed on the device, deploy_chrome will
and suggest to run dev_install on the device, to get rsync
installed.
BUG=448315
TEST=confirm that deploy_chrome warns if rsync is not found on the device
Change-Id: Ia7f7042ac95b34f32e8564cb9ddc100cf1e8e33f
Reviewed-on: https://chromium-review.googlesource.com/240878
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Satoru Takabayashi <satorux@chromium.org>
Trybot-Ready: Satoru Takabayashi <satorux@chromium.org>
Commit-Queue: Satoru Takabayashi <satorux@chromium.org>
diff --git a/scripts/deploy_chrome.py b/scripts/deploy_chrome.py
index 8bab308..399fc9b 100644
--- a/scripts/deploy_chrome.py
+++ b/scripts/deploy_chrome.py
@@ -248,6 +248,10 @@
logging.info('Copying Chrome to %s on device...', self.options.target_dir)
# Show the output (status) for this command.
dest_path = _CHROME_DIR
+ if not self.device.HasRsync():
+ raise DeployFailure(
+ 'rsync is not found on the device.\n'
+ 'Run dev_install on the device to get rsync installed')
self.device.CopyToDevice('%s/' % os.path.abspath(self.staging_dir),
self.options.target_dir,
inplace=True, debug_level=logging.INFO,