From 6eb52d04bc077bb45ca568c4dac49efeceb9bf8b Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 13 Sep 2017 16:35:27 +0200 Subject: reproducible Debian: allow maximum of 30min for diffing the two build logs Signed-off-by: Holger Levsen --- bin/reproducible_build.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index c252664b..96acd93d 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -179,9 +179,12 @@ diff_copy_buildlogs() { if [ -f b1/build.log ] ; then if [ -f b2/build.log ] ; then printf "Diff of the two buildlogs:\n\n--\n" | tee -a $DIFF - diff -u b1/build.log b2/build.log | tee -a $DIFF + LOCALDIFFTIMEOUT="30m" + timeout $LOCALDIFFTIMEOUT diff -u b1/build.log b2/build.log | tee -a $DIFF if [ ${PIPESTATUS[0]} -eq 0 ] ; then echo "The two build logs are identical! \o/" | tee -a $DIFF + elif [ ${PIPESTATUS[0]} -eq 124 ] ; then + echo "Diffing the two build logs ran into timeout after $LOCALDIFFTIMEOUT, sorry." | tee -a $DIFF fi echo -e "\nCompressing the 2nd log..." gzip -9vn $DIFF -- cgit v1.2.3-70-g09d2