Permalink
Browse files

autogen.des / vtest.sh : support out-of-tree builds

... which revealed that they actually fail atm, so another fix will be coming up
  • Loading branch information...
1 parent e49133d commit 01689b987ebfffdc0b4e01af59406840a7d6fc61 @nigoroll nigoroll committed Dec 7, 2016
Showing with 16 additions and 6 deletions.
  1. +4 −2 autogen.des
  2. +12 −4 tools/vtest.sh
View
@@ -2,6 +2,8 @@
#
# Use this when doing code development
+SRCDIR=${SRCDIR:-.}
+
set -ex
make -k distclean > /dev/null 2>&1 || true
@@ -21,15 +23,15 @@ else
fi
rm -f configure
-. ./autogen.sh 2>&1 | egrep -v "(subdir-objects|is in a subdirectory)"
+(cd $SRCDIR && . ./autogen.sh 2>&1 | egrep -v "(subdir-objects|is in a subdirectory)")
# autoconf prior to 2.62 has issues with zsh 4.2 and newer
export CONFIG_SHELL=/bin/sh
# NB: Workaround for make distcheck not working with
# NB: FreeBSD's make on -current
# env MAKE=gmake \
-./configure \
+$SRCDIR/configure \
$DST \
--enable-developer-warnings \
--enable-debugging-symbols \
View
@@ -48,6 +48,9 @@ MAXRUNS="${MAXRUNS:-0}"
SSH_DST="-p 203 vtest@varnish-cache.org"
+export SRCDIR=`pwd`/varnish-cache
+export BUILDDIR=${BUILDDIR:-${SRCDIR}}
+
#######################################################################
if ! (cd varnish-cache 2>/dev/null) ; then
@@ -62,14 +65,14 @@ fi
autogen () (
set -e
- cd varnish-cache
+ cd "${BUILDDIR}"
nice make distclean > /dev/null 2>&1 || true
- nice sh autogen.des
+ nice sh "${SRCDIR}"/autogen.des
)
makedistcheck () (
set -e
- cd varnish-cache
+ cd "${BUILDDIR}"
nice make distcheck
)
@@ -82,7 +85,7 @@ failedtests () (
git log -n 1 ${t} | head -1
)
b=`basename ${t} .vtc`
- for i in `find varnish-cache -name ${b}.log -print`
+ for i in `find "${BUILDDIR}" -name ${b}.log -print`
do
if [ -f ${i} ] ; then
mv ${i} "_report/_${b}.log"
@@ -142,6 +145,11 @@ do
waitnext=${WAITBAD}
orev=${rev}
+ if ! [ -d "${BUILDDIR}" ] && ! mkdir -p "${BUILDDIR}" ; then
+ echo >&1 "could not create BUILDDIR ${BUILDDIR}"
+ exit 2
+ fi
+
rm -rf _report
mkdir _report
export LOG=_report/_log

0 comments on commit 01689b9

Please sign in to comment.