Greg Ward committed ead5e87

Add TESTPATH so it's possible to test multiple versions of Subversion.

Comments (0)

Files changed (4)

   make install DESTDIR=/tmp/packageroot PREFIX=/usr
+Please report build failures to the development mailing list,
+vcprompt includes a fairly comprehensive test suite. If you want to
+run it, see "Testing" below.
 (For more details, see the man page.)
+To run vcprompt's test suite:
+  make check
+If it fails, it should be loud and obvious. Please report any test
+failures to the development mailing list:
+To check for memory errors, you can run vcprompt's test suite under
+  make grind
+Obviously, this requires that you have valgrind installed.
+Testing different Subversion versions
+Subversion changes its working copy format every couple of years, so
+vcprompt supports three formats: the pre-1.4 XML format, the 1.4..1.6
+plain-text format, and the post-1.7 SQLite format. Actually testing
+these requires that you have different versions of Subversion on hand,
+each installed in a separate prefix.
+For example, I keep multiple versions in /usr/local/subversion-1.x, so
+I can test them like this:
+  rm -f tests/svn-repo.tar && make check-svn TOOLPATH=/usr/local/subversion-1.6/bin
+  rm -f tests/svn-repo.tar && make check-svn TOOLPATH=/usr/local/subversion-1.7/bin
+Actually *building* multiple versions of Subversion is harder than you
+would believe. (In fact, I've been unable to build anything older than
+1.5, so vcprompt's support for pre-1.4 working copies is currently
     exit 1
+# Prepend $TOOLPATH to $PATH (if $TOOLPATH set), so caller can
+# influence where external tools (e.g. svn, hg) are found. Must be
+# called before check_available if it's to be of any use.
+    if [ -s "$TOOLPATH" ]; then
+    fi
 # Check if some external command is available by running it
 # and ensuring that it prints an expected string.  If not,
 # exit with optional message.
 . ./
 check_available "svn --version" "svn, version "
 set -ex
 cd `dirname $`
     svn -q switch $repourl/branches/stable
     assert_vcprompt "no branch name on branch" "" "%b"
     assert_vcprompt "rev num on branch" "4" "%r"
+    posttest