summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-06 14:54:26 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-18 17:20:08 +0200
commite25e08b1be4a5588fa3683bbf0106193e6f44c05 (patch)
tree8cb181c331039dd8696078e4caeff1e508b146d2
parent63a2d41c77ab8a0f1f4f338bd54a4e418cf5f482 (diff)
downloadjenkins.debian.net-e25e08b1be4a5588fa3683bbf0106193e6f44c05.tar.xz
reproducible: build: refactor: slim down the call_debbindiff() function: strip out dbd_timeout()
-rwxr-xr-xbin/reproducible_build.sh18
1 files changed, 11 insertions, 7 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index 16ad7996..cfa03680 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -102,24 +102,28 @@ init_debbindiff() {
fi
}
+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}
+ if [ ! -s ./${DBDREPORT} ] ; then
+ echo "$(date) - $DBDVERSION produced no output and was killed after running into timeout after $TIMEOUT..." >> ${DBDREPORT}
+ fi
+ SAVE_ARTIFACTS=3
+}
+
call_debbindiff() {
init_debbindiff
echo | tee -a ${RBUILDLOG}
- TIMEOUT="30m" # don't forget to also change the "seq 0 200" loop 17 lines above
+ TIMEOUT="30m" # don't forget to also change the "seq 0 200" loop 17 lines above
DBDVERSION="$(schroot --directory /tmp -c source:jenkins-reproducible-unstable-debbindiff debbindiff -- --version 2>&1)"
echo "$(date) - $DBDVERSION will be used to compare the two builds now." | tee -a ${RBUILDLOG}
+ set -x
( timeout $TIMEOUT schroot --directory $TMPDIR -c source:jenkins-reproducible-unstable-debbindiff debbindiff -- --html ./${DBDREPORT} ./b1/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes ./b2/${SRCPACKAGE}_${EVERSION}_${ARCH}.changes 2>&1 ) 2>&1 >> ${RBUILDLOG}
RESULT=$?
set +x
- set -e
rm -f $DBDCHROOT_READLOCK
echo | tee -a ${RBUILDLOG}
if [ $RESULT -eq 124 ] ; then
- echo "$(date) - $DBDVERSION was killed after running into timeout after $TIMEOUT... maybe there is still $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${DBDREPORT}" | tee -a ${RBUILDLOG}
- if [ ! -s ./${DBDREPORT} ] ; then
- echo "$(date) - $DBDVERSION produced no output and was killed after running into timeout after $TIMEOUT..." >> ${DBDREPORT}
- fi
- SAVE_ARTIFACTS=3
+ dbd_timeout
elif [ $RESULT -eq 1 ] ; then
DEBBINDIFFOUT="$DBDVERSION found issues, please investigate $REPRODUCIBLE_URL/dbd/${SUITE}/${ARCH}/${DBDREPORT}"
elif [ $RESULT -eq 2 ] ; then