From 67f28163aef45c18448ce8c319fe8d395d55b373 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Mon, 6 Apr 2015 16:59:00 +0200 Subject: reproducible: build: refactor: call handle_ftbr() at the end of dbd_timeout + better message generation --- bin/reproducible_build.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 1c1548b3..071150eb 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -79,7 +79,6 @@ update_db_and_html() { fi # unmark build since it's properly finished sqlite3 -init $INIT ${PACKAGES_DB} "DELETE FROM schedule WHERE package_id='$SRCPKGID';" - set +x gen_packages_html $SUITE $SRCPACKAGE echo echo "Successfully updated the database and updated $REPRODUCIBLE_URL/rb-pkg/${SUITE}/${ARCH}/$SRCPACKAGE.html" @@ -126,12 +125,12 @@ handle_ftbr() { echo "$(date) - ${SRCPACKAGE} failed to build reproducibly in ${SUITE} on ${ARCH}." | tee -a ${RBUILDLOG} cp b1/${BUILDINFO} /var/lib/jenkins/userContent/buildinfo/${SUITE}/${ARCH}/ > /dev/null 2>&1 || true # will fail if there is no .buildinfo if [ ! -z "$FTRmessage" ] ; then - echo "${FTBRmessage}." | tee -a ${RBUILDLOG} + echo "$(date) - ${FTBRmessage}." | tee -a ${RBUILDLOG} fi if [ -f ./${DBDREPORT} ] ; then mv ./${DBDREPORT} /var/lib/jenkins/userContent/dbd/${SUITE}/${ARCH}/ else - echo "$DBDVERSION produced no output (which is strange)." | tee -a $RBUILDLOG + echo "$(date) - $DBDVERSION produced no output (which is strange)." | tee -a $RBUILDLOG fi calculate_build_duration update_db_and_html "unreproducible" @@ -181,11 +180,14 @@ init_debbindiff() { } dbd_timeout() { - echo "$(date) - $DBDVERSION was killed after running into timeout after $TIMEOUT... maybe there is still $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${DBDREPORT}" | tee -a ${RBUILDLOG} + local msg="DBDVERSION was killed after running into timeout after ${TIMEOUT}" if [ ! -s ./${DBDREPORT} ] ; then echo "$(date) - $DBDVERSION produced no output and was killed after running into timeout after $TIMEOUT..." >> ${DBDREPORT} + else + local msg="$msg, but there is still $REPRODUCIBLE_URL/dbd/$SUITE/$ARCH/$DDBREPORT" fi SAVE_ARTIFACTS=3 + handle_ftbr "$msg" } call_debbindiff() { -- cgit v1.2.3-70-g09d2