Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: tools/gen_bench_expectations_from_codereview.py

Issue 368043002: gen_bench_expectations: use subprocess instead of shell_utils due to buildbot-side name collision (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gen_bench_expectations_from_codereview.py
diff --git a/tools/gen_bench_expectations_from_codereview.py b/tools/gen_bench_expectations_from_codereview.py
index 4c41c9a72e3cdda6580676b23ecfc342002c7422..f0463fea15b6e24495cb3cc62bb8ce85bb0c7dbc 100644
--- a/tools/gen_bench_expectations_from_codereview.py
+++ b/tools/gen_bench_expectations_from_codereview.py
@@ -14,12 +14,10 @@ import json
import os
import re
import shutil
+import subprocess
import sys
import urllib2
-import fix_pythonpath # pylint: disable=W0611
-from common.py.utils import shell_utils
-
BENCH_DATA_URL = 'gs://chromium-skia-gm/perfdata/%s/%s/bench_*_data_*'
BUILD_STATUS_SUCCESS = 0
@@ -98,7 +96,7 @@ def get_bench_data(builder, build_num, dest_dir):
dest_dir: string; destination directory for the bench data.
"""
url = BENCH_DATA_URL % (builder, build_num)
- shell_utils.run(['gsutil', 'cp', '-R', url, dest_dir])
+ subprocess.check_call(['gsutil', 'cp', '-R', url, dest_dir])
def find_revision_from_downloaded_data(dest_dir):
@@ -199,7 +197,7 @@ def gen_bench_expectations_from_codereview(codereview_url,
os.makedirs(dest_dir)
try:
get_bench_data(try_builder, try_build.build_number, dest_dir)
- except shell_utils.CommandFailedException:
+ except subprocess.CalledProcessError:
failed_data_pull.append(try_builder)
continue
@@ -215,12 +213,12 @@ def gen_bench_expectations_from_codereview(codereview_url,
output_file = os.path.join(CHECKOUT_PATH, 'expectations', 'bench',
'bench_expectations_%s.txt' % builder)
try:
- shell_utils.run(['python',
- os.path.join(CHECKOUT_PATH, 'bench',
- 'gen_bench_expectations.py'),
- '-b', builder, '-o', output_file,
- '-d', dest_dir, '-r', revision])
- except shell_utils.CommandFailedException:
+ subprocess.check_call(['python',
+ os.path.join(CHECKOUT_PATH, 'bench',
+ 'gen_bench_expectations.py'),
+ '-b', builder, '-o', output_file,
+ '-d', dest_dir, '-r', revision])
+ except subprocess.CalledProcessError:
failed_gen_expectations.append(builder)
failure = ''
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698