[Qa-jenkins-scm] [jenkins.debian.net] 01/02: openwrt: use BUILD_LOG to create openwrt/logs

Holger Levsen holger at moszumanska.debian.org
Fri Dec 11 09:57:38 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 3229b47b17793c2f79439b40b865c3853b8cfc31
Author: Alexander Couzens <lynxis at fe80.eu>
Date:   Thu Dec 10 20:51:24 2015 +0100

    openwrt: use BUILD_LOG to create openwrt/logs
    
    BUILD_LOG=1 will create a logs/ directory where openwrt
    create a directory for every target and saves log files in there.
    
    Between both builds save the logs in a tar.xz ball and publish it under
    https://repoducible.debian.net/openwrt/logs_a.tar.xz and
    https://repoducible.debian.net/openwrt/logs_b.tar.xz
---
 bin/reproducible_openwrt.sh | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index 2141ebd..fc4220a 100755
--- a/bin/reproducible_openwrt.sh
+++ b/bin/reproducible_openwrt.sh
@@ -31,6 +31,12 @@ create_results_dirs() {
 	mkdir -p $BASE/openwrt/dbd
 }
 
+save_openwrt_logs() {
+	local postfix="$1"
+
+	tar cJf "$BASE/openwrt/dbd/logs_${postfix}.tar.xz" logs/
+}
+
 save_openwrt_results() {
 	RUN=$1
 	cd bin
@@ -77,7 +83,7 @@ openwrt_build() {
 	RUN=$1
 	TARGET=$2
 
-	OPTIONS="-j $NUM_CPU IGNORE_ERRORS=y"
+	OPTIONS="-j $NUM_CPU IGNORE_ERRORS=y BUILD_LOG=1"
 
 	echo "============================================================================="
 	echo "$(date -u) - Building OpenWrt ${OPENWRT_VERSION} ($TARGET) - $RUN build run."
@@ -100,6 +106,7 @@ openwrt_cleanup() {
 	rm build_dir/target-* -rf
 	rm staging_dir/target-* -rf
 	rm bin/* -rf
+	rm logs/* -rf
 }
 
 build_two_times() {
@@ -119,6 +126,9 @@ build_two_times() {
 	# save results in b1
 	save_openwrt_results b1
 
+	# copy logs
+	save_openwrt_logs b1
+
 	# clean up between builds
 	openwrt_cleanup
 
@@ -137,6 +147,9 @@ build_two_times() {
 	# save results in b2
 	save_openwrt_results b2
 
+	# copy logs
+	save_openwrt_logs b2
+
 	# reset environment to default values again
 	export LANG="en_GB.UTF-8"
 	unset LC_ALL

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