[Qa-jenkins-scm] [jenkins.debian.net] 02/02: reproducible rpms: refactor and increase timeout for a single build to 8h (was 4h)

Holger Levsen holger at moszumanska.debian.org
Mon Dec 14 14:35:53 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit a0a46ce6cf3a69cfc1bc5921df7c37601bb401c2
Author: Holger Levsen <holger at layer-acht.org>
Date:   Mon Dec 14 15:35:35 2015 +0100

    reproducible rpms: refactor and increase timeout for a single build to 8h (was 4h)
---
 bin/reproducible_build_rpm.sh | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/bin/reproducible_build_rpm.sh b/bin/reproducible_build_rpm.sh
index b61efdf..6b12d29 100755
--- a/bin/reproducible_build_rpm.sh
+++ b/bin/reproducible_build_rpm.sh
@@ -96,12 +96,12 @@ first_build() {
 	download_package
 	local RESULTDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
 	local LOG=$TMPDIR/b1/$SRCPACKAGE/build1.log
-	# nicely run mock with a timeout of 4h
-	timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
+	# nicely run mock with a timeout of $TIMEOUT hours
+	timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \
 		mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after -v --rebuild $SRC_RPM 2>&1 | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -eq 124 ] ; then
-		echo "$(date -u) - mock was killed by timeout after 4h." | tee -a $LOG
+		echo "$(date -u) - mock was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
 	fi
 	if ! "$DEBUG" ; then set +x ; fi
 }
@@ -118,12 +118,12 @@ second_build() {
 	local RESULTDIR="/tmp/$SRCPACKAGE-$(basename $TMPDIR)"
 	local LOG=$TMPDIR/b2/$SRCPACKAGE/build2.log
 	# NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)
-	# nicely run mock with a timeout of 4h
-	timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
+        # nicely run mock with a timeout of $TIMEOUT hours
+        timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \
 		mock -r $RELEASE-$ARCH --resultdir=$RESULTDIR --cleanup-after -v --rebuild $SRC_RPM 2>&1 | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -eq 124 ] ; then
-		echo "$(date -u) - mock was killed by timeout after 4h." | tee -a $LOG
+		echo "$(date -u) - mock was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
 	fi
 	if ! "$DEBUG" ; then set +x ; fi
 }
@@ -173,6 +173,7 @@ TMPDIR=$(mktemp --tmpdir=/srv/reproducible-results -d)  # where everything actua
 trap cleanup_all INT TERM EXIT
 cd $TMPDIR
 
+TIMEOUT=8	# maximum time in hours for a single build
 DATE=$(date -u +'%Y-%m-%d %H:%M')
 START=$(date +'%s')
 DUMMY=$(mktemp -t rpm-dummy-XXXXXXXX)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list