From ab548f227dbb17dbeb96ef38db56e09d05ed0300 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Wed, 26 Aug 2015 01:53:47 +0200 Subject: reproducible openwrt: sort unreproducible packages up and boring reproducible ones down --- bin/reproducible_openwrt.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'bin/reproducible_openwrt.sh') diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh index 8caf986a..b5ce8a27 100755 --- a/bin/reproducible_openwrt.sh +++ b/bin/reproducible_openwrt.sh @@ -210,6 +210,8 @@ echo "========================================================================== echo "$(date -u) - Running $DIFFOSCOPE on OpenWrt images and packages." echo "=============================================================================" DBD_HTML=$(mktemp --tmpdir=$TMPDIR) +DBD_GOOD_PKGS_HTML=$(mktemp --tmpdir=$TMPDIR) +DBD_BAD_PKGS_HTML=$(mktemp --tmpdir=$TMPDIR) # run diffoscope on the images GOOD_IMAGES=0 ALL_IMAGES=0 @@ -265,11 +267,10 @@ for i in * ; do PKGS2=$(find * -type f -name "*.ipk" | sort -u ) popd - echo " " >> $DBD_HTML for j in $(printf "$PKGS1\n$PKGS2" | sort -u ) ; do let ALL_PACKAGES+=1 if [ ! -f $TMPDIR/b1/$i/$j -o ! -f $TMPDIR/b2/$i/$j ] ; then - echo " " >> $DBD_HTML + echo " " >> $DBD_BAD_PKGS_HTML rm -f $BASE/openwrt/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed continue fi @@ -278,17 +279,22 @@ for i in * ; do if [ -f $TMPDIR/$i/$j.html ] ; then mkdir -p $BASE/openwrt/dbd/$i/$(dirname $j) mv $TMPDIR/$i/$j.html $BASE/openwrt/dbd/$i/$j.html - echo " " >> $DBD_HTML + echo " " >> $DBD_BAD_PKGS_HTML else SHASUM=$(sha256sum $j|cut -d " " -f1) - echo " " >> $DBD_HTML + echo " " >> $DBD_GOOD_PKGS_HTML let GOOD_PACKAGES+=1 rm -f $BASE/openwrt/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed fi done cd .. - echo "
Packages for $i
\"ftbfs $j (${SIZE}K) failed to build once.
\"ftbfs $j (${SIZE}K) failed to build once.
\"unreproducible $j ($SIZE) is unreproducible.
\"unreproducible $j ($SIZE) is unreproducible.
\"reproducible $j ($SHASUM, $SIZE) is reproducible.
\"reproducible $j ($SHASUM, $SIZE) is reproducible.
" >> $DBD_HTML done +echo " " >> $DBD_HTML +cat $DBD_BAD_PKGS_HTML >> $DBD_HTML +echo "
Unreproducible packages
" >> $DBD_HTML +echo " " >> $DBD_HTML +cat $DBD_GOOD_PKGS_HTML >> $DBD_HTML +echo "
Reproducible packages
" >> $DBD_HTML GOOD_PERCENT_PACKAGES=$(echo "scale=1 ; ($GOOD_PACKAGES*100/$ALL_PACKAGES)" | bc) # are we there yet? if [ "$GOOD_PERCENT_IMAGES" = "100.0" ] || [ "$GOOD_PERCENT_PACKAGES" = "100.0" ]; then @@ -332,7 +338,7 @@ cat $TOOLCHAIN_HTML >> $PAGE write_page " " write_page_footer OpenWrt publish_page -rm -f $DBD_HTML $TOOLCHAIN_HTML $BANNER_HTML +rm -f $DBD_HTML $DBD_GOOD_PKGS_HTML $DBD_BAD_PKGS_HTML $TOOLCHAIN_HTML $BANNER_HTML # the end calculate_build_duration -- cgit v1.2.3-54-g00ecf