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

Unified Diff: upload_symbols

Issue 3635001: crosutils: Detect sym_upload errors by its stdout instead of return value (Closed) Base URL: http://git.chromium.org/git/crosutils.git
Patch Set: Created 10 years, 2 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: upload_symbols
diff --git a/upload_symbols b/upload_symbols
index 71162a6637f1263f6c7c5482b18f92f10de8d326..96307b42479cad25910f36e56cb7f2c7cc1c6313 100755
--- a/upload_symbols
+++ b/upload_symbols
@@ -32,10 +32,10 @@ SYM_UPLOAD="sym_upload"
ANY_ERRORS=0
-ERR_FILE=$(mktemp "/tmp/err.XXXX")
+OUT_DIR=$(mktemp -d "/tmp/err.XXXX")
function cleanup() {
- rm -f "${ERR_FILE}"
+ rm -rf "${OUT_DIR}"
}
function really_upload() {
@@ -63,10 +63,11 @@ function upload_file() {
if [ ${FLAGS_verbose} -eq ${FLAGS_TRUE} ]; then
info "Uploading ${upload_file}"
fi
- if ! "${SYM_UPLOAD}" "${upload_file}" "${upload_url}" > /dev/null \
- 2> "${ERR_FILE}"; then
+ "${SYM_UPLOAD}" "${upload_file}" "${upload_url}" > "${OUT_DIR}/stdout" \
+ 2> "${OUT_DIR}/stderr"
+ if ! grep -q "Successfully sent the symbol file." "${OUT_DIR}/stdout"; then
error "Unable to upload symbols in ${upload_file}:"
- cat "${ERR_FILE}"
+ cat "${OUT_DIR}/stderr"
ANY_ERRORS=1
return 1
fi
« 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