aboutsummaryrefslogtreecommitdiff
path: root/crosperf/download_images.py
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2014-04-27 22:28:42 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-04-29 03:10:50 +0000
commit226e3e08106dffd3086a7eee7007950a1d8ddfaf (patch)
tree56107d8bddb9cfac25c48ec978e00c0d2400bfcf /crosperf/download_images.py
parent4375f760cb471a09b410d4034028eb8e45b1ba24 (diff)
downloadtoolchain-utils-226e3e08106dffd3086a7eee7007950a1d8ddfaf.tar.gz
Fix small bugs with non-autotest Telemetry; other cleanups.
This CL fixes various small problems found during recent testing: - Force show_all_results to be true for 'pure' telemetry case (the results filtering needs the autotest results to work properly) - Fix bug that was inserting extra 'src' into Chrome src path sometimes - Since non-autotest Telemetry and non-Telemetry-Crosperf tests can't handle 'perf' make it a Fatal error to call them with perf args. - Add missing field to example experiment file. - Add status output messages to downlaod_images.py for non-verbose logging. BUG=None TEST=Tested all these fixes on multiple test runs. Change-Id: If8209356c695dc8b21f8627399a1cbd4a858df23 Reviewed-on: https://chrome-internal-review.googlesource.com/161759 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'crosperf/download_images.py')
-rw-r--r--crosperf/download_images.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/crosperf/download_images.py b/crosperf/download_images.py
index ac8fd3a4..3927000a 100644
--- a/crosperf/download_images.py
+++ b/crosperf/download_images.py
@@ -26,6 +26,9 @@ class ImageDownloader(object):
build_id_tuple = eval(build_id_tuple_str)
build_id = build_id_tuple[0]
+ if self.log_level == "average":
+ self._logger.LogOutput ("Preparing to download %s image to local directory." % build_id)
+
# Make sure the directory for downloading the image exists.
download_path = os.path.join(chromeos_root, "chroot/tmp",
build_id)
@@ -42,11 +45,20 @@ class ImageDownloader(object):
"/chromiumos_test_image.tar.xz /tmp/%s" % (build_id,
build_id))
+ if self.log_level != "verbose":
+ self._logger.LogOutput ("CMD: %s" % command)
retval = self._ce.ChrootRunCommand(chromeos_root, command)
# Uncompress and untar the downloaded image.
command = ("cd /tmp/%s ;unxz chromiumos_test_image.tar.xz; "
"tar -xvf chromiumos_test_image.tar" % build_id)
+ if self.log_level != "verbose":
+ self._logger.LogOutput("CMD: %s" % command)
+ print("(Uncompressing and un-tarring may take a couple of minutes..."
+ "please be patient.)")
retval = self._ce.ChrootRunCommand(chromeos_root, command)
+ if retval == 0 and self.log_level != "quiet":
+ self._logger.LogOutput("Using image from %s." % image_path)
+
return retval, image_path