diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-07-07 11:19:54 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-07-07 11:19:54 +0200 |
commit | 40b6833493a340f8162e03623e72e09561031c7c (patch) | |
tree | 7cc5c64177b6949de1ce12fe74b4cf35b1a5e1da /bin | |
parent | a634f5136738b5159bc9a9bba660e89819384b34 (diff) | |
download | jenkins.debian.net-40b6833493a340f8162e03623e72e09561031c7c.tar.xz |
reproducible: refactoring
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/reproducible_build.sh | 4 | ||||
-rwxr-xr-x | bin/reproducible_common.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_coreboot.sh | 44 | ||||
-rwxr-xr-x | bin/reproducible_netbsd.sh | 2 | ||||
-rwxr-xr-x | bin/reproducible_openwrt.sh | 4 |
5 files changed, 7 insertions, 49 deletions
diff --git a/bin/reproducible_build.sh b/bin/reproducible_build.sh index 7a0c8bb4..58988d28 100755 --- a/bin/reproducible_build.sh +++ b/bin/reproducible_build.sh @@ -266,7 +266,7 @@ dbd_timeout() { handle_ftbr "$msg" } -call_debbindiff() { +call_debbindiff_on_changes_files() { local TMPLOG=(mktemp --tmpdir=$TMPDIR) echo | tee -a ${RBUILDLOG} local TIMEOUT="30m" @@ -552,7 +552,7 @@ update_rbuildlog if [ $FTBFS -eq 1 ] ; then handle_ftbfs elif [ $FTBFS -eq 0 ] ; then - call_debbindiff # defines DBDVERSION, update_db_and_html defines STATUS + call_debbindiff_on_changes_files # defines DBDVERSION, update_db_and_html defines STATUS fi check_for_race_conditions diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh index c5a3e7ab..5a7f51ec 100755 --- a/bin/reproducible_common.sh +++ b/bin/reproducible_common.sh @@ -369,7 +369,7 @@ irc_message() { kgb-client --conf /srv/jenkins/kgb/debian-reproducible.conf --relay-msg "$MESSAGE" || true # don't fail the whole job } -call_debbindiff_on_any_file() { +call_debbindiff() { mkdir -p $TMPDIR/$1/$(dirname $2) local TMPLOG=(mktemp --tmpdir=$TMPDIR) local msg="" diff --git a/bin/reproducible_coreboot.sh b/bin/reproducible_coreboot.sh index 55794e36..038dd579 100755 --- a/bin/reproducible_coreboot.sh +++ b/bin/reproducible_coreboot.sh @@ -26,48 +26,6 @@ create_results_dirs() { mkdir -p $BASE/coreboot/dbd } -call_debbindiff() { - local TMPLOG=(mktemp --tmpdir=$TMPDIR) - local msg="" - set +e - ( timeout $TIMEOUT schroot \ - --directory $TMPDIR \ - -c source:jenkins-reproducible-${DBDSUITE}-debbindiff \ - debbindiff -- \ - --html $TMPDIR/$1.html \ - $TMPDIR/b1/$1/coreboot.rom \ - $TMPDIR/b2/$1/coreboot.rom 2>&1 \ - ) 2>&1 >> $TMPLOG - RESULT=$? - if ! "$DEBUG" ; then set +x ; fi - set -e - cat $TMPLOG # print dbd output - rm -f $TMPLOG - case $RESULT in - 0) echo "$(date -u) - $1/coreboot.rom is reproducible, yay!" - ;; - 1) - echo "$(date -u) - $DBDVERSION found issues, please investigate $1/coreboot.rom" - ;; - 2) - msg="$(date -u) - $DBDVERSION had trouble comparing the two builds. Please investigate $1/coreboot.rom" - ;; - 124) - if [ ! -s $TMPDIR/$1.html ] ; then - msg="$(date -u) - $DBDVERSION produced no output for $1/coreboot.rom and was killed after running into timeout after ${TIMEOUT}..." - else - msg="$DBDVERSION was killed after running into timeout after $TIMEOUT, but there is still $TMPDIR/$1.html" - fi - ;; - *) - msg="$(date -u) - Something weird happened when running $DBDVERSION on $1/coreboot.rom (which exited with $RESULT) and I don't know how to handle it." - ;; - esac - if [ ! -z $msg ] ; then - echo $msg | tee -a $TMPDIR/$1.html - fi -} - save_coreboot_results(){ RUN=$1 cd coreboot-builds @@ -209,7 +167,7 @@ cd $TMPDIR/b1 for i in $(ls -1d *| sort -u) ; do let ALL_ROMS+=1 if [ -f $i/coreboot.rom ] ; then - call_debbindiff $i + call_debbindiff $i coreboot.rom get_filesize $i/coreboot.rom if [ -f $TMPDIR/$i.html ] ; then mv $TMPDIR/$i.html $BASE/coreboot/dbd/$i.html diff --git a/bin/reproducible_netbsd.sh b/bin/reproducible_netbsd.sh index 9766b671..1d821243 100755 --- a/bin/reproducible_netbsd.sh +++ b/bin/reproducible_netbsd.sh @@ -129,7 +129,7 @@ for i in * ; do echo " <table><tr><th>Release files for <code>$i</code></th></tr>" >> $FILES_HTML for j in $(find * -type f |sort -u ) ; do let ALL_FILES+=1 - call_debbindiff_on_any_file $i $j + call_debbindiff $i $j get_filesize $j if [ -f $TMPDIR/$i/$j.html ] ; then mkdir -p $BASE/netbsd/dbd/$i/$(dirname $j) diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh index 16d94b10..2d89b92b 100755 --- a/bin/reproducible_openwrt.sh +++ b/bin/reproducible_openwrt.sh @@ -216,7 +216,7 @@ for i in * ; do echo " <table><tr><th>Images for <code>$i</code></th></tr>" >> $DBD_HTML for j in $(find * -name "*.bin" -o -name "*.squashfs" |sort -u ) ; do let ALL_IMAGES+=1 - call_debbindiff_on_any_file $i $j + call_debbindiff $i $j get_filesize $j if [ -f $TMPDIR/$i/$j.html ] ; then mkdir -p $BASE/openwrt/dbd/$i @@ -243,7 +243,7 @@ for i in * ; do echo " <table><tr><th>Packages for <code>$i</code></th></tr>" >> $DBD_HTML for j in $(find * -name "*.ipk" |sort -u ) ; do let ALL_PACKAGES+=1 - call_debbindiff_on_any_file $i $j + call_debbindiff $i $j get_filesize $j if [ -f $TMPDIR/$i/$j.html ] ; then mkdir -p $BASE/openwrt/dbd/$i/$(dirname $j) |