From c1e7b46ea3d6616f3844c30e89f5014d0c3d6926 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Tue, 15 Sep 2020 11:44:49 -0700 Subject: llvm_tools: tweak script verbosity At the moment, this script is silent except for when gsutil sneakily prints file copying status to stdout/stderr. Since we're already configuring `logging` here, be a bit more descriptive about our current status. BUG=None TEST=Ran the script. Change-Id: Ibcdb0f6cd488e70b9f810a9ca615556a7d672948 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2412481 Reviewed-by: Manoj Gupta Tested-by: George Burgess --- llvm_tools/bisect_clang_crashes.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'llvm_tools') diff --git a/llvm_tools/bisect_clang_crashes.py b/llvm_tools/bisect_clang_crashes.py index e7ce96e4..9ea10352 100755 --- a/llvm_tools/bisect_clang_crashes.py +++ b/llvm_tools/bisect_clang_crashes.py @@ -70,12 +70,17 @@ def main(argv): os.makedirs(temporary_directory, exist_ok=True) urls = get_artifacts('gs://chromeos-toolchain-artifacts/clang-crash-diagnoses' '/**/*clang_crash_diagnoses.tar.xz') + logging.info('%d crash URLs found', len(urls)) + visited = {} if os.path.exists(state_file): buildbucket_ids = {url.split('/')[-2] for url in urls} with open(state_file, encoding='utf-8') as f: data = json.load(f) visited = {k: v for k, v in data.items() if k in buildbucket_ids} + logging.info('Successfully loaded %d previously-submitted crashes', + len(visited)) + for url in urls: splits = url.split('/') buildbucket_id = splits[-2] @@ -85,7 +90,9 @@ def main(argv): visited[buildbucket_id] = '%s' % url dest_dir = os.path.join(temporary_directory, buildbucket_id) dest_file = os.path.join(dest_dir, splits[-1]) - subprocess.check_output(['gsutil', 'cp', url, dest_file]) + logging.info('Downloading and submitting %r...', url) + subprocess.check_output(['gsutil', 'cp', url, dest_file], + stderr=subprocess.STDOUT) subprocess.check_output(['tar', '-xJf', dest_file], cwd=dest_dir) for src, script in get_crash_reproducers(dest_dir): -- cgit v1.2.3