From b7e493b4e4ad6cf6f9367e4b139df042526c21de Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Thu, 14 Dec 2017 19:44:41 -0800 Subject: [PATCH] catalyst-auto: run trigger_post_build after every successful spec, to export results sooner. Signed-off-by: Robin H. Johnson --- tools/catalyst-auto | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/catalyst-auto b/tools/catalyst-auto index 35443c4a..f605873c 100755 --- a/tools/catalyst-auto +++ b/tools/catalyst-auto @@ -115,6 +115,13 @@ catalyst_var() { (. "${CATALYST_CONFIG}"; echo "${!var}") } +trigger_post_build() { + if ! run_cmd "${TMPDIR}/log/post_build.log" post_build; then + send_email "Catalyst build error - post_build" "The post_build function failed" "${TMPDIR}/log/post_build.log" + exit 1 + fi +} + # Parse args while [ ${#} -gt 0 ] do @@ -334,6 +341,8 @@ for a in "" ${SETS}; do build_failure=1 send_email "Catalyst fatal build error - ${i}" "" "${LOGFILE}" continue 2 + else + trigger_post_build fi done @@ -344,6 +353,8 @@ for a in "" ${SETS}; do build_failure=1 send_email "Catalyst non-fatal build error - ${i}" "" "${LOGFILE}" break + else + trigger_post_build fi done @@ -355,10 +366,7 @@ for a in "" ${SETS}; do update_symlinks done -if ! run_cmd "${TMPDIR}/log/post_build.log" post_build; then - send_email "Catalyst build error - post_build" "The post_build function failed" "${TMPDIR}/log/post_build.log" - exit 1 -fi +trigger_post_build if [ ${build_failure} = 0 ]; then if [[ ${lastrun} -ne 0 ]]; then