aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2020-09-15 11:44:49 -0700
committerGeorge Burgess <gbiv@chromium.org>2020-09-15 19:59:14 +0000
commitc1e7b46ea3d6616f3844c30e89f5014d0c3d6926 (patch)
tree0ac81ee9fb0f7edb312466c4ca044c9336889be1
parent29a3f18786590bfcfc98bf0640b02bb684d80ec3 (diff)
downloadtoolchain-utils-c1e7b46ea3d6616f3844c30e89f5014d0c3d6926.tar.gz
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 <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
-rwxr-xr-xllvm_tools/bisect_clang_crashes.py9
1 files changed, 8 insertions, 1 deletions
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):