diff options
Diffstat (limited to 'crosperf/download_images.py')
-rw-r--r-- | crosperf/download_images.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crosperf/download_images.py b/crosperf/download_images.py index e3951b99..72f3fb04 100644 --- a/crosperf/download_images.py +++ b/crosperf/download_images.py @@ -7,6 +7,8 @@ import ast import os +import test_flag + from utils import command_executer class MissingImage(Exception): @@ -87,8 +89,10 @@ class ImageDownloader(object): # Verify that image exists for build_id, before attempting to # download it. - cmd = "gsutil ls %s" % image_name - status = self._ce.ChrootRunCommand(chromeos_root, cmd) + status = 0 + if not test_flag.GetTestMode(): + cmd = "gsutil ls %s" % image_name + status = self._ce.ChrootRunCommand(chromeos_root, cmd) if status != 0: raise MissingImage("Cannot find official image: %s." % image_name) image_path = self._DownloadImage(chromeos_root, build_id, image_name) |