summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2015-12-10 20:51:24 +0100
committerHolger Levsen <holger@layer-acht.org>2015-12-11 10:57:17 +0100
commit3229b47b17793c2f79439b40b865c3853b8cfc31 (patch)
tree5f3d0df9986ec30b2ba146ac2e482af3d23e30b5 /bin
parent4606474fa991660369602bca6750dbf39fb33e82 (diff)
downloadjenkins.debian.net-3229b47b17793c2f79439b40b865c3853b8cfc31.tar.xz
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
Diffstat (limited to 'bin')
-rwxr-xr-xbin/reproducible_openwrt.sh15
1 files changed, 14 insertions, 1 deletions
diff --git a/bin/reproducible_openwrt.sh b/bin/reproducible_openwrt.sh
index 2141ebd2..fc4220aa 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