Pass -q to gsutil.py cp in upload_benchmark_data_to_google_storage.py
This removes a lot of noise on the bot stdout.
Change-Id: Ie89e662ccbeaaf7c440aa93c3bdca9aabb5e5ff6
diff --git a/tools/run_on_app.py b/tools/run_on_app.py
index da6bc9f..98cfd07 100755
--- a/tools/run_on_app.py
+++ b/tools/run_on_app.py
@@ -660,6 +660,7 @@
destination = os.path.join(utils.LIBS, 'r8-' + options.hash + '.jar')
utils.download_file_from_cloud_storage(download_path,
destination,
+ printcmd=not quiet,
quiet=quiet)
# Additional flags for the compiler from the configuration file.
diff --git a/tools/update_prebuilds_in_android.py b/tools/update_prebuilds_in_android.py
index 623bacd..6c9fa77 100755
--- a/tools/update_prebuilds_in_android.py
+++ b/tools/update_prebuilds_in_android.py
@@ -93,7 +93,8 @@
url = archive.GetUploadDestination(hash_or_version, target, is_hash)
if not quiet:
print('Downloading: ' + url + ' -> ' + download_path)
- utils.download_file_from_cloud_storage(url, download_path, quiet=quiet)
+ utils.download_file_from_cloud_storage(
+ url, download_path, printcmd=not quiet, quiet=quiet)
def main_download(hash, maps, targets, target_root, version, keepanno=False):
diff --git a/tools/upload_benchmark_data_to_google_storage.py b/tools/upload_benchmark_data_to_google_storage.py
index 995f8e2..e93a58b 100755
--- a/tools/upload_benchmark_data_to_google_storage.py
+++ b/tools/upload_benchmark_data_to_google_storage.py
@@ -30,6 +30,7 @@
utils.download_file_from_cloud_storage(perf.GetGSLocation('*'),
dest,
concurrent=True,
+ quiet=True,
flags=['-R'])
diff --git a/tools/utils.py b/tools/utils.py
index 41f4329..80377d5 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -502,15 +502,18 @@
destination,
concurrent=False,
flags=None,
+ printcmd=True,
quiet=False):
cmd = [get_gsutil()]
if concurrent:
cmd.append('-m')
+ if quiet:
+ cmd.append('-q')
cmd.append('cp')
if flags:
cmd.extend(flags)
cmd.extend([source, destination])
- PrintCmd(cmd, quiet=quiet)
+ PrintCmd(cmd, quiet=not printcmd)
subprocess.check_call(cmd)