commit | 3d483dafb68bc332cabe191c6dcca0fb175338fd | [log] [tgz] |
---|---|---|
author | Garry Wang <xianuowang@chromium.org> | Thu Sep 17 18:13:52 2020 -0700 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Sep 18 21:24:10 2020 +0000 |
tree | 899f3e0a01ddd61b689aa486630e88f64cad23d7 | |
parent | 274e381e17700a90cf2fc1183ca07d6e8b359de0 [diff] |
autotest: Make sure the destination directory exists before upload profile BUG=None TEST=unittest Change-Id: I375f55e1be8b4f082abf2566aa01a5cb700edcc6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2417231 Tested-by: Garry Wang <xianuowang@chromium.org> Reviewed-by: Otabek Kasimov <otabek@google.com> Commit-Queue: Garry Wang <xianuowang@chromium.org>
diff --git a/server/cros/device_health_profile/device_health_profile.py b/server/cros/device_health_profile/device_health_profile.py index bb2073b..9650267 100644 --- a/server/cros/device_health_profile/device_health_profile.py +++ b/server/cros/device_health_profile/device_health_profile.py
@@ -100,6 +100,10 @@ def _upload_profile(self): """Copy profile file from local path to remote profile host. """ + # Make sure the device health profile directory exists on profile host. + self._profile_host.run('mkdir -p %s' % PROFILE_FILE_DIR, + ignore_status=True) + logging.debug('Uploading profile from local path: %s to remote %s:%s', self._local_path, self._profile_host.hostname,