[Qa-jenkins-scm] [jenkins.debian.net] 02/04: reproducible openwrt: refactor, introduce save_openwrt_results(), fix bug with cleaning up between builds

Holger Levsen holger at moszumanska.debian.org
Fri Jun 12 16:26:39 UTC 2015


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 3948a0b90d8d050c9cd349de5522f199e3fb8823
Author: Holger Levsen <holger at layer-acht.org>
Date:   Fri Jun 12 18:18:36 2015 +0200

    reproducible openwrt: refactor, introduce save_openwrt_results(), fix bug with cleaning up between builds
---
 bin/reproducible_openwrt.sh | 52 ++++++++++++++++++---------------------------
 1 file changed, 21 insertions(+), 31 deletions(-)

diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index 81cc0eb..3e37360 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -65,6 +65,20 @@ call_debbindiff() {
 	fi
 }
 
+save_openwrt_results(){
+	RUN=$1
+	cd bin
+	for i in * ; do
+		cd $i
+		mkdir -p $TMPDIR/$RUN/$i
+		for j in $(find . -name "*.bin") ; do
+			cp -p $j $TMPDIR/$RUN/$i/
+		done
+		cd ..
+	done
+	cd ..
+}
+
 #
 # main
 #
@@ -100,10 +114,8 @@ echo "$(date -u) - Building openwrt ${OPENWRT_VERSION} images now - first build
 echo "============================================================================="
 export TZ="/usr/share/zoneinfo/Etc/GMT+12"
 # actually build everything
-#nice ionice -c 3 \
-#	make
 nice ionice -c 3 \
-	make target/compile
+	make -j $NUM_CPU target/compile
 nice ionice -c 3 \
 	make -j $NUM_CPU package/cleanup
 nice ionice -c 3 \
@@ -115,23 +127,13 @@ nice ionice -c 3 \
 nice ionice -c 3 \
 	make -j $NUM_CPU package/index
 
-cd bin
-for i in * ; do
-	cd $i
-	mkdir -p $TMPDIR/b1/$i
-	for j in $(find . -name "*.bin") ; do
-		cp -p $j $TMPDIR/b1/$i/
-	done
-	cd ..
-done
-cd ..
-rm bin -r
+# save results in b1
+save_openwrt_results b1
 
-#
 # clean up between builds
-#
 rm build_dir/target-* -r
 rm staging_dir/target-* -r
+rm bin/* -r
 
 echo "============================================================================="
 echo "$(date -u) - Building openwrt images now - second build run."
@@ -144,12 +146,9 @@ export CAPTURE_ENVIRONMENT="I capture the environment"
 umask 0002
 # use allmost all cores for second build
 NEW_NUM_CPU=$(echo $NUM_CPU-1|bc)
-#nice ionice -c 3 \
-#	linux64 --uname-2.6 \
-#		make
 nice ionice -c 3 \
 	linux64 --uname-2.6 \
-		make target/compile
+		make -j $NUM_CPU target/compile
 nice ionice -c 3 \
 	linux64 --uname-2.6 \
 		make -j $NEW_NUM_CPU package/cleanup
@@ -173,17 +172,8 @@ export TZ="/usr/share/zoneinfo/UTC"
 export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:"
 umask 0022
 
-cd bin
-for i in * ; do
-	cd $i
-	mkdir -p $TMPDIR/b2/$i
-	for j in $(find . -name "*.bin") ; do
-		cp -p $j $TMPDIR/b2/$i/
-	done
-	cd ..
-done
-cd ..
-rm bin -r
+# save results in b2
+save_openwrt_results b2
 
 #
 # create html about toolchain used

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