[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible archlinux: refactor and kill build after 8 (instead of 4) hours

Holger Levsen holger at moszumanska.debian.org
Sat Dec 12 09:47:06 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 1ad6c347c0ce08cfde59c6f64166715dd0ccd048
Author: Holger Levsen <holger at layer-acht.org>
Date:   Sat Dec 12 10:45:37 2015 +0100

    reproducible archlinux: refactor and kill build after 8 (instead of 4) hours
---
 bin/reproducible_build_archlinux_pkg.sh | 12 ++++++------
 bin/reproducible_html_archlinux.sh      |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/bin/reproducible_build_archlinux_pkg.sh b/bin/reproducible_build_archlinux_pkg.sh
index 89ad224..6d79dd5 100755
--- a/bin/reproducible_build_archlinux_pkg.sh
+++ b/bin/reproducible_build_archlinux_pkg.sh
@@ -124,12 +124,12 @@ first_build() {
 	schroot --run-session -c $SESSION --directory /tmp -- cp -r /var/abs/$REPOSITORY/$SRCPACKAGE $BUILDDIR/
 	# just set timezone in the 1st build
 	echo 'export TZ="/usr/share/zoneinfo/Etc/GMT+12"' | schroot --run-session -c $SESSION --directory /tmp -- tee -a /var/lib/jenkins/.bashrc
-	# nicely run makepkg with a timeout of 4h
-	timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
+	# nicely run makepkg with a timeout of $TIMEOUT hours
+	timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \
 		schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -eq 124 ] ; then
-		echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG
+		echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
 	fi
 	schroot --end-session -c $SESSION
 	if ! "$DEBUG" ; then set +x ; fi
@@ -158,12 +158,12 @@ second_build() {
 	export LC_ALL="fr_CH.UTF-8"
 	umask 0002
 	__END__
-	# nicely run makepkg with a timeout of 4h
-	timeout -k 4.1h 4h /usr/bin/ionice -c 3 /usr/bin/nice \
+	# nicely run makepkg with a timeout of $TIMEOUT hours
+	timeout -k $TIMEOUT.1h ${TIMEOUT}h /usr/bin/ionice -c 3 /usr/bin/nice \
 		schroot --run-session -c $SESSION --directory $BUILDDIR/$SRCPACKAGE -- bash -l -c 'makepkg --syncdeps --noconfirm --skippgpcheck 2>&1' | tee -a $LOG
 	PRESULT=${PIPESTATUS[0]}
 	if [ $PRESULT -eq 124 ] ; then
-		echo "$(date -u) - makepkg was killed by timeout after 4h." | tee -a $LOG
+		echo "$(date -u) - makepkg was killed by timeout after ${TIMEOUT}h." | tee -a $LOG
 	fi
 	schroot --end-session -c $SESSION
 	if ! "$DEBUG" ; then set +x ; fi
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh
index a92497b..8c1f095 100755
--- a/bin/reproducible_html_archlinux.sh
+++ b/bin/reproducible_html_archlinux.sh
@@ -76,9 +76,9 @@ for REPOSITORY in $ARCHLINUX_REPOS ; do
 			elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
 				HTML_TARGET=$HTML_FTBFS
 				echo "       <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to verify source" >> $HTML_BUFFER
-			elif [ ! -z "$(egrep 'makepkg was killed by timeout after 4h' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
+			elif [ ! -z "$(egrep 'makepkg was killed by timeout after' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then
 				HTML_TARGET=$HTML_FTBFS
-				echo "       <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, killed by timeout after 4h" >> $HTML_BUFFER
+				echo "       <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, killed by timeout" >> $HTML_BUFFER
 			else
 				echo "       probably failed to build from source, please investigate" >> $HTML_BUFFER
 				HTML_TARGET=$HTML_UNKNOWN

-- 
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