[Qa-jenkins-scm] [jenkins.debian.net] 01/03: reproducible openwrt: add lede_save_results

Holger Levsen holger at layer-acht.org
Wed Jul 13 19:02:07 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 ed2a6d02cf2dce887ba4f319e83852115189f1e8
Author: Alexander Couzens <lynxis at fe80.eu>
Date:   Wed Jul 13 17:58:35 2016 +0200

    reproducible openwrt: add lede_save_results
    
    lede has a slight different output directory layout
    
    Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
 bin/reproducible_openwrt.sh | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index 1de18e0..7f1338e 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -2,6 +2,7 @@
 
 # Copyright 2014-2015 Holger Levsen <holger at layer-acht.org>
 #         © 2015 Reiner Herrmann <reiner at reiner-h.de>
+#           2016 Alexander Couzens <lynxis at fe80.eu>
 # released under the GPLv=2
 
 OPENWRT_GIT_REPO=git://git.openwrt.org/openwrt.git
@@ -37,6 +38,46 @@ save_openwrt_logs() {
 	tar cJf "$BASE/openwrt/dbd/logs_${postfix}.tar.xz" logs/
 }
 
+save_lede_results() {
+	RUN=$1
+	cd bin/targets
+	for target in * ; do
+		pushd $target || continue
+		for subtarget in * ; do
+			pushd $subtarget || continue
+
+			# save firmware images
+			mkdir -p $TMPDIR/$RUN/$target/$subtarget/
+			for image in $(find * -name "*.bin" -o -name "*.squashfs") ; do
+				cp -p $image $TMPDIR/$RUN/$target/$subtarget/
+			done
+
+			# save subtarget specific packages
+			if [ -d packages ] ; then
+				pushd packages
+				for package in $(find * -name "*.ipk") ; do
+					mkdir -p $TMPDIR/$RUN/packages/$target/$subtarget/$(dirname $package)
+					cp -p $package $TMPDIR/$RUN/packages/$target/$subtarget/$(dirname $package)/
+				done
+				popd
+			fi
+		done
+		popd
+	done
+
+	# arch is like mips_34kc_dsp
+	popd bin/packages/
+	for arch in * ; do
+		pushd $arch || continue
+		for package in $(find * -name "*.ipk") ; do
+			mkdir -p $TMPDIR/$RUN/packages/$arch/$(dirname $package)
+			cp -p $package $TMPDIR/$RUN/packages/$arch/$(dirname $package)/
+		done
+		popd
+	done
+	pushd
+}
+
 save_openwrt_results() {
 	RUN=$1
 	cd bin

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