From 9adfc1d04451c9054586a56c2f670eec4417bea3 Mon Sep 17 00:00:00 2001
From: Holger Levsen
Date: Wed, 26 Aug 2015 13:35:03 +0200
Subject: reproducible netbsd: sort unreproducible packages up and boring
reproducible ones down
---
bin/reproducible_netbsd.sh | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)
(limited to 'bin')
diff --git a/bin/reproducible_netbsd.sh b/bin/reproducible_netbsd.sh
index b3ba1b56..3be712e4 100755
--- a/bin/reproducible_netbsd.sh
+++ b/bin/reproducible_netbsd.sh
@@ -125,7 +125,10 @@ echo "==========================================================================
echo "$(date -u) - Running $DIFFOSCOPE on netbsd..."
echo "============================================================================="
FILES_HTML=$(mktemp --tmpdir=$TMPDIR)
-echo " " > $FILES_HTML
+GOOD_FILES_HTML=$(mktemp --tmpdir=$TMPDIR)
+BAD_FILES_HTML=$(mktemp --tmpdir=$TMPDIR)
+GOOD_SECTION_HTML=$(mktemp --tmpdir=$TMPDIR)
+BAD_SECTION_HTML=$(mktemp --tmpdir=$TMPDIR)
GOOD_FILES=0
ALL_FILES=0
SIZE=""
@@ -134,7 +137,6 @@ cd $TMPDIR/b1
tree .
for i in * ; do
cd $i
- echo " Release files for $i |
" >> $FILES_HTML
for j in $(find * -type f |sort -u ) ; do
let ALL_FILES+=1
call_diffoscope $i $j
@@ -142,16 +144,27 @@ for i in * ; do
if [ -f $TMPDIR/$i/$j.html ] ; then
mkdir -p $BASE/netbsd/dbd/$i/$(dirname $j)
mv $TMPDIR/$i/$j.html $BASE/netbsd/dbd/$i/$j.html
- echo " $j ($SIZE) is unreproducible. |
" >> $FILES_HTML
+ echo " $j ($SIZE) is unreproducible. |
" >> $BAD_FILES_HTML
else
SHASUM=$(sha256sum $j|cut -d " " -f1)
- echo " $j ($SHASUM, $SIZE) is reproducible. |
" >> $FILES_HTML
+ echo " $j ($SHASUM, $SIZE) is reproducible. |
" >> $GOOD_FILES_HTML
let GOOD_FILES+=1
rm -f $BASE/netbsd/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed
fi
done
cd ..
- echo "
" >> $FILES_HTML
+ if [ -s $GOOD_FILES_HTML ] ; then
+ echo " Reproducible artifacts for $i |
" >> $GOOD_SECTION_HTML
+ cat $GOOD_FILES_HTML >> $GOOD_SECTION_HTML
+ echo "
" >> $GOOD_SECTION_HTML
+ rm $GOOD_FILES_HTML
+ fi
+ if [ -s $BAD_FILES_HTML ] ; then
+ echo " Unreproducible artifacts for $i |
" >> $BAD_SECTION_HTML
+ cat $BAD_FILES_HTML >> $BAD_SECTION_HTML
+ echo "
" >> $BAD_SECTION_HTML
+ rm $BAD_FILES_HTML
+ fi
done
GOOD_PERCENT=$(echo "scale=1 ; ($GOOD_FILES*100/$ALL_FILES)" | bc)
# are we there yet?
@@ -192,14 +205,15 @@ else
fi
write_page " These tests were last run on $DATE for version ${NETBSD_VERSION} using ${DIFFOSCOPE}.
"
write_explaination_table NetBSD
-cat $FILES_HTML >> $PAGE
+cat $BAD_SECTION_HTML >> $PAGE
+cat $GOOD_SECTION_HTML >> $PAGE
write_page " "
echo -n "$NETBSD" >> $PAGE
write_page "
"
write_page " "
write_page_footer NetBSD
publish_page
-rm -f $FILES_HTML
+rm -f $FILES_HTML $GOOD_FILES_HTML $BAD_FILES_HTML $GOOD_SECTION_HTML $BAD_SECTION_HTML
# the end
calculate_build_duration
--
cgit v1.2.3-70-g09d2