summaryrefslogtreecommitdiffstats
path: root/contrib/jenkins-arm.sh
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-10-23 14:57:56 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-10-24 15:31:07 +0000
commit754e6877cccddd0a279659c32fa594b23369dc61 (patch)
treefcb985b62a5b37b1b196f9dd874fc86f299b475f /contrib/jenkins-arm.sh
parenta568af25d2a8382265b44c9b2b3a72ca504d2443 (diff)
fixups for recent "Cleanup jenkins build scripts"
Change I24e500e132f5c8e8133d35548cb7b4e4552331d0 was merged, but IMHO needs improvement. Fix these: - clean the git source tree before each build step, in common prep_build(). - fix indenting inside the build() macros. - change build() arg to be build_dir, to absorb cleanup steps into build(). - in jenkins.sh, use $ENABLE_SANITIZE as global env, not passed as arg. - in jenkins.sh, don't do 'make distcheck' twice. It is not necessary to do it from source tree as well as separately from source tree, since distcheck already moves to a different build dir. Change-Id: I09d306350602f21943d5bd45f7388c83ede9b524
Diffstat (limited to 'contrib/jenkins-arm.sh')
-rwxr-xr-xcontrib/jenkins-arm.sh21
1 files changed, 11 insertions, 10 deletions
diff --git a/contrib/jenkins-arm.sh b/contrib/jenkins-arm.sh
index e0c75fa6..ef116b12 100755
--- a/contrib/jenkins-arm.sh
+++ b/contrib/jenkins-arm.sh
@@ -2,8 +2,13 @@
. $(dirname "$0")/jenkins_common.sh
+src_dir="$PWD"
build() {
- $1 --enable-static \
+ build_dir="$1"
+
+ prep_build "$src_dir" "$build_dir"
+
+ "$src_dir"/configure --enable-static \
--prefix=/usr/local/arm-none-eabi \
--host=arm-none-eabi \
--enable-embedded \
@@ -11,15 +16,11 @@ build() {
--disable-shared \
CFLAGS="-Os -ffunction-sections -fdata-sections -nostartfiles -nodefaultlibs -Werror"
-$MAKE $PARALLEL_MAKE \
- || cat-testlogs.sh
+ $MAKE $PARALLEL_MAKE \
+ || cat-testlogs.sh
}
# verify build in dir other than source tree
-mkdir -p builddir
-cd builddir
-build ../configure
-
-cd ..
-build ./configure
-
+build builddir
+# verify build in source tree
+build .