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 2013/07/29 05:33:24 UTC

svn commit: r1507889 - /subversion/trunk/subversion/tests/cmdline/davautocheck.sh

Author: danielsh
Date: Mon Jul 29 03:33:24 2013
New Revision: 1507889

URL: http://svn.apache.org/r1507889
Log:
davautocheck.sh: use the APXS value from Makefile.  Without this patch,
/usr/bin/apxs2 would be used even if --with-apxs=... was passed to configure.

I think the
 || APXS=$(which apxs) \
 || APXS=$(which apxs2) \
lines may be removed now, too.

* subversion/tests/cmdline/davautocheck.sh
  (APXS): Sniff the value from Makefile.  Since this depends on $ABS_BUILDDIR,
    move the code that sets that variable up (without changing it).

Modified:
    subversion/trunk/subversion/tests/cmdline/davautocheck.sh

Modified: subversion/trunk/subversion/tests/cmdline/davautocheck.sh
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/davautocheck.sh?rev=1507889&r1=1507888&r2=1507889&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/davautocheck.sh (original)
+++ subversion/trunk/subversion/tests/cmdline/davautocheck.sh Mon Jul 29 03:33:24 2013
@@ -27,7 +27,7 @@
 # testing are:
 #   - Subversion built using --enable-shared --enable-dso --with-apxs options,
 #   - Working Apache 2 HTTPD Server with the apxs program reachable through
-#     PATH or specified via the APXS environment variable,
+#     PATH or specified via the APXS Makefile variable or environment variable,
 #   - Modules dav_module and log_config_module compiled as DSO or built into
 #     Apache HTTPD Server executable.
 # The basic intension of this script is to be able to perform "make check"
@@ -164,6 +164,17 @@ get_prog_name() {
 # ### Presumably this is used to locate /usr/sbin/apxs or /usr/sbin/apache2    
 PATH="$PATH:/usr/sbin:/usr/local/sbin"
 
+# Find the source and build directories. The build dir can be found if it is
+# the current working dir or the source dir.
+ABS_SRCDIR=$(cd ${SCRIPTDIR}/../../../; pwd)
+if [ -x subversion/svn/svn ]; then
+  ABS_BUILDDIR=$(pwd)
+elif [ -x $ABS_SRCDIR/subversion/svn/svn ]; then
+  ABS_BUILDDIR=$ABS_SRCDIR
+else
+  fail "Run this script from the root of Subversion's build tree!"
+fi
+
 # Remove any proxy environmental variables that affect wget or curl.
 # We don't need a proxy to connect to localhost and having the proxy
 # environmental variables set breaks the Apache configuration file
@@ -175,6 +186,8 @@ unset HTTPS_PROXY
 
 # Pick up value from environment or PATH (also try apxs2 - for Debian)
 [ ${APXS:+set} ] \
+ || (APXS=$(grep '^APXS' $ABS_BUILDDIR/Makefile | sed 's/^APXS *= *//') && \
+     [ -n "$APXS" ]) \
  || APXS=$(which apxs) \
  || APXS=$(which apxs2) \
  || fail "neither apxs or apxs2 found - required to run davautocheck"
@@ -200,17 +213,6 @@ if [ ${CACHE_REVPROPS:+set} ]; then
   CACHE_REVPROPS_SETTING=on
 fi
 
-# Find the source and build directories. The build dir can be found if it is
-# the current working dir or the source dir.
-ABS_SRCDIR=$(cd ${SCRIPTDIR}/../../../; pwd)
-if [ -x subversion/svn/svn ]; then
-  ABS_BUILDDIR=$(pwd)
-elif [ -x $ABS_SRCDIR/subversion/svn/svn ]; then
-  ABS_BUILDDIR=$ABS_SRCDIR
-else
-  fail "Run this script from the root of Subversion's build tree!"
-fi
-
 if [ ${MODULE_PATH:+set} ]; then
     MOD_DAV_SVN="$MODULE_PATH/mod_dav_svn.so"
     MOD_AUTHZ_SVN="$MODULE_PATH/mod_authz_svn.so"