svnserveautocheck: Support out-of-tree builds when running a single test file.
* subversion/tests/cmdline/svnserveautocheck.sh:
After computing ABS_BUILDDIR, use it to extract ABS_SRCDIR from Makeflie
and use that to find the *_tests.py script to invoke.
@@ -67,14 +67,21 @@ fail() {
}
if [ -x subversion/svn/svn ]; then
+ # cwd is build tree root
ABS_BUILDDIR=$(pwd)
elif [ -x $SCRIPTDIR/../../svn/svn ]; then
+ # cwd is subversion/tests/cmdline/ in the build tree
cd $SCRIPTDIR/../../../
ABS_BUILDDIR=$(pwd)
cd - >/dev/null
else
fail "Run this script from the root of Subversion's build tree!"
fi
+# Cater for out-of-tree builds
+ABS_SRCDIR=`<$ABS_BUILDDIR/Makefile sed -ne 's/^srcdir = //p'`
+if [ ! -e $ABS_SRCDIR/subversion/include/svn_version.h ]; then
+ fail "Run this script from the root of Subversion's build tree!"
+fi
# If you change this, also make sure to change the svn:ignore entry
# for it and "make check-clean".
@@ -130,7 +137,7 @@ else
cd "$ABS_BUILDDIR/subversion/tests/cmdline/"
TEST="$1"
shift
- TIME_CMD "./${TEST}_tests.py" "--url=$BASE_URL" $*
+ TIME_CMD "$ABS_SRCDIR/subversion/tests/cmdline/${TEST}_tests.py" "--url=$BASE_URL" $*
r=$?
cd - > /dev/null
fi
