[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible_lede: move resulting images into targets dir

Holger Levsen holger at layer-acht.org
Sun Jul 24 15:17:45 UTC 2016


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 0b4d9e94923280e5e836105a8b82e9b01f1714d0
Author: Alexander Couzens <lynxis at fe80.eu>
Date:   Sun Jul 24 13:56:25 2016 +0200

    reproducible_lede: move resulting images into targets dir
    
    Make the structure more clean when packages are seperate from
    images
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_lede.sh           | 66 ++++++++++++++++++++------------------
 bin/reproducible_openwrt_common.sh |  4 +--
 2 files changed, 37 insertions(+), 33 deletions(-)

diff --git a/bin/reproducible_lede.sh b/bin/reproducible_lede.sh
index 176c58a..8705277 100755
--- a/bin/reproducible_lede.sh
+++ b/bin/reproducible_lede.sh
@@ -100,40 +100,44 @@ DBD_BAD_PKGS_HTML=$(mktemp --tmpdir=$TMPDIR)
 GOOD_IMAGES=0
 ALL_IMAGES=0
 SIZE=""
-cd $TMPDIR/b1
+cd $TMPDIR/b1/targets
 tree .
-for i in * ; do
-	cd $i
-
-	# search images in both paths to find non-existing ones
-	IMGS1=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u )
-	pushd $TMPDIR/b2/$i
-	IMGS2=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u )
-	popd
-
-	echo "       <table><tr><th>Images for <code>$i</code></th></tr>" >> $DBD_HTML
-	for j in $(printf "$IMGS1\n$IMGS2" | sort -u ) ; do
-		let ALL_IMAGES+=1
-		if [ ! -f $TMPDIR/b1/$i/$j -o ! -f $TMPDIR/b2/$i/$j ] ; then
-			echo "         <tr><td><img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> $j (${SIZE}) failed to build.</td></tr>" >> $DBD_HTML
-			rm -f $BASE/lede/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed
-			continue
-		fi
-		call_diffoscope $i $j
-		get_filesize $j
-		if [ -f $TMPDIR/$i/$j.html ] ; then
-			mkdir -p $BASE/lede/dbd/$i
-			mv $TMPDIR/$i/$j.html $BASE/lede/dbd/$i/$j.html
-			echo "         <tr><td><a href=\"dbd/$i/$j.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $j</a> (${SIZE}) is unreproducible.</td></tr>" >> $DBD_HTML
-		else
-			SHASUM=$(sha256sum $j|cut -d " " -f1)
-			echo "         <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $j ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_HTML
-			let GOOD_IMAGES+=1
-			rm -f $BASE/lede/dbd/$i/$j.html # cleanup from previous (unreproducible) tests - if needed
-		fi
+for target in * ; do
+	cd $target
+	for subtarget in * ; do
+		cd $subtarget
+
+		# search images in both paths to find non-existing ones
+		IMGS1=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u )
+		pushd $TMPDIR/b2/targets/$target/$subtarget
+		IMGS2=$(find * -type f -name "*.bin" -o -name "*.squashfs" | sort -u )
+		popd
+
+		echo "       <table><tr><th>Images for <code>$target/$subtarget</code></th></tr>" >> $DBD_HTML
+		for image in $(printf "$IMGS1\n$IMGS2" | sort -u ) ; do
+			let ALL_IMAGES+=1
+			if [ ! -f $TMPDIR/b1/$target/$subtarget/$image -o ! -f $TMPDIR/b2/$target/$subtarget/$image ] ; then
+				echo "         <tr><td><img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> $image (${SIZE}) failed to build.</td></tr>" >> $DBD_HTML
+				rm -f $BASE/lede/dbd/$target/$subtarget/$image.html # cleanup from previous (unreproducible) tests - if needed
+				continue
+			fi
+			call_diffoscope $target/$subtarget $image
+			get_filesize $image
+			if [ -f $TMPDIR/$target/$subtarget/$image.html ] ; then
+				mkdir -p $BASE/lede/dbd/$target/$subtarget
+				mv $TMPDIR/$target/$subtarget/$image.html $BASE/lede/dbd/$target/$subtarget/$image.html
+				echo "         <tr><td><a href=\"dbd/$target/$subtarget/$image.html\"><img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> $image</a> (${SIZE}) is unreproducible.</td></tr>" >> $DBD_HTML
+			else
+				SHASUM=$(sha256sum $image|cut -d " " -f1)
+				echo "         <tr><td><img src=\"/userContent/static/weather-clear.png\" alt=\"reproducible icon\" /> $image ($SHASUM, $SIZE) is reproducible.</td></tr>" >> $DBD_HTML
+				let GOOD_IMAGES+=1
+				rm -f $BASE/lede/dbd/$target/$subtarget/$image.html # cleanup from previous (unreproducible) tests - if needed
+			fi
+		done
+		cd ..
+		echo "       </table>" >> $DBD_HTML
 	done
 	cd ..
-	echo "       </table>" >> $DBD_HTML
 done
 GOOD_PERCENT_IMAGES=$(echo "scale=1 ; ($GOOD_IMAGES*100/$ALL_IMAGES)" | bc)
 # run diffoscope on the packages
diff --git a/bin/reproducible_openwrt_common.sh b/bin/reproducible_openwrt_common.sh
index a678f6a..2e774b4 100644
--- a/bin/reproducible_openwrt_common.sh
+++ b/bin/reproducible_openwrt_common.sh
@@ -41,9 +41,9 @@ save_lede_results() {
 			pushd $subtarget || continue
 
 			# save firmware images
-			mkdir -p $TMPDIR/$RUN/$target/$subtarget/
+			mkdir -p $TMPDIR/$RUN/targets/$target/$subtarget/
 			for image in $(find * -name "*.bin" -o -name "*.squashfs") ; do
-				cp -p $image $TMPDIR/$RUN/$target/$subtarget/
+				cp -p $image $TMPDIR/$RUN/targets/$target/$subtarget/
 			done
 
 			# save subtarget specific packages

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