summaryrefslogtreecommitdiffstats
path: root/contrib/jenkins.sh
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/jenkins.sh')
-rwxr-xr-xcontrib/jenkins.sh26
1 files changed, 15 insertions, 11 deletions
diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index c397d528..d7315040 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -9,19 +9,23 @@ if [ "x$label" = "xFreeBSD_amd64" ]; then
ENABLE_SANITIZE=""
fi
+src_dir="$PWD"
build() {
- $1 --enable-static $2 CFLAGS="-Werror" CPPFLAGS="-Werror"
-$MAKE $PARALLEL_MAKE check \
- || cat-testlogs.sh
-$MAKE distcheck \
- || cat-testlogs.sh
+ build_dir="$1"
+
+ prep_build "$src_dir" "$build_dir"
+
+ "$src_dir"/configure --enable-static $ENABLE_SANITIZE CFLAGS="-Werror" CPPFLAGS="-Werror"
+ $MAKE $PARALLEL_MAKE check \
+ || cat-testlogs.sh
}
# verify build in dir other than source tree
-mkdir -p builddir
-cd builddir
-build ../configure $ENABLE_SANITIZE
-
-cd ..
-build ./configure $ENABLE_SANITIZE
+build builddir
+# verify build in source tree
+build .
+# do distcheck only once, which is fine from built source tree, since distcheck
+# is well separated from the source tree state.
+$MAKE distcheck \
+ || cat-testlogs.sh