You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2017/07/16 18:55:18 UTC
svn commit: r1802081 -
/subversion/trunk/subversion/tests/cmdline/svnserveautocheck.sh
Author: danielsh
Date: Sun Jul 16 18:55:17 2017
New Revision: 1802081
URL: http://svn.apache.org/viewvc?rev=1802081&view=rev
Log:
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.
Modified:
subversion/trunk/subversion/tests/cmdline/svnserveautocheck.sh
Modified: subversion/trunk/subversion/tests/cmdline/svnserveautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svnserveautocheck.sh?rev=1802081&r1=1802080&r2=1802081&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svnserveautocheck.sh (original)
+++ subversion/trunk/subversion/tests/cmdline/svnserveautocheck.sh Sun Jul 16 18:55:17 2017
@@ -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