Skip to content

Commit f1a35b5

Browse files
authored
Don't upload stats on build error
1 parent 7040c50 commit f1a35b5

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

zorg/buildbot/builders/sanitizers/buildbot_functions.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,11 @@ function build_stage2 {
306306
-DCMAKE_CXX_FLAGS="${sanitizer_cflags}" \
307307
-DCMAKE_EXE_LINKER_FLAGS="${sanitizer_ldflags}" \
308308
$LLVM && \
309-
/usr/bin/time -o ${ROOT}/time.txt -- ninja ) || build_failure
309+
/usr/bin/time -o ${ROOT}/time.txt -- ninja ) || {
310+
build_failure
311+
# No stats on failure.
312+
return 0
313+
}
310314
(md5sum ${build_dir}/bin/clang* > ${ROOT}/md5.txt) || true
311315

312316
upload_stats stage2
@@ -482,7 +486,11 @@ function build_stage3 {
482486
-DCMAKE_CXX_FLAGS="${sanitizer_cflags}" \
483487
-DLLVM_CCACHE_BUILD=OFF \
484488
$LLVM && \
485-
/usr/bin/time -o ${ROOT}/time.txt -- ninja ) || build_failure
489+
/usr/bin/time -o ${ROOT}/time.txt -- ninja ) || {
490+
build_failure
491+
# No stats on failure.
492+
return 0
493+
}
486494
(md5sum ${build_dir}/bin/clang* > ${ROOT}/md5.txt) || true
487495

488496
upload_stats stage3
@@ -570,4 +578,4 @@ function upload_stats() {
570578
gsutil cp "${ROOT}/"{time,md5,cpu,machine-type}".txt" "gs://sanitizer-buildbot-out/${BUILDBOT_BUILDERNAME}/${1}/${BUILDBOT_REVISION}/" || true
571579
fi
572580
cat "${ROOT}/"{time,md5}".txt"
573-
}
581+
}

0 commit comments

Comments
 (0)