summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-10-16 12:32:30 +0200
committerHolger Levsen <holger@layer-acht.org>2015-10-16 12:32:30 +0200
commit91f0fb3d17027a6365634d728eec0c7e807346d0 (patch)
tree87eedded092bbfc103f3b4c58e590a8f0f459269 /bin
parentbff818eba4fe1c6bc49b728f2e351d80a5ac6598 (diff)
downloadjenkins.debian.net-91f0fb3d17027a6365634d728eec0c7e807346d0.tar.xz
reproducible: check pbuilder return code and explain if it was killed by timeout (improved version)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_build.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh
index a8d27e25..3405f04b 100755
--- a/bin/reproducible_build.sh
+++ b/bin/reproducible_build.sh
@@ -559,6 +559,10 @@ EOF
--logfile b1/build.log \
${SRCPACKAGE}_${EVERSION}.dsc
) 2>&1 | tee -a $RBUILDLOG
+ PRESULT=${PIPESTATUS[0]}
+ if [ $PRESULT -eq 124 ] ; then
+ echo "$(date -u) - pbuilder was killed by timeout after 12h." | tee -a b1/build.log $RBUILDLOG
+ fi
if ! "$DEBUG" ; then set +x ; fi
rm $TMPCFG
}
@@ -585,6 +589,7 @@ export LANG="fr_CH.UTF-8"
export LC_ALL="fr_CH.UTF-8"
umask 0002
EOF
+ set +e
# remember to change the sudoers setting if you change the following command
sudo timeout -k 12.1h 12h /usr/bin/ionice -c 3 /usr/bin/nice \
/usr/bin/linux64 --uname-2.6 \
@@ -596,7 +601,12 @@ EOF
--basetgz /var/cache/pbuilder/$SUITE-reproducible-base.tgz \
--buildresult $TMPDIR/b2 \
--logfile b2/build.log \
- ${SRCPACKAGE}_${EVERSION}.dsc || true # exit with 1 when ftbfs
+ ${SRCPACKAGE}_${EVERSION}.dsc
+ PRESULT=$?
+ set -e
+ if [ $PRESULT -eq 124 ] ; then
+ echo "$(date -u) - pbuilder was killed by timeout after 12h." | tee -a b2/build.log
+ fi
if ! "$DEBUG" ; then set +x ; fi
rm $TMPCFG
}