diff tests/test-merge-tools @ 8674:0941ee76489e

run-tests: redefine --with-hg so it takes the 'hg' script to run. - in parseargs(), check that --with-hg value is valid - add handy --local option for "--with-hg=../hg" - ensure that we always set PATH and PYTHONPATH (not just when doing a temporary install) - override any existing PYTHONPATH, so test success does not depend on whatever happens to be in the caller's environment - give tests a little more control by exporting $PYTHON to the environment; needed by test-convert and test-mergetool when they run hg with a stripped-down $PATH Also, add a big comment explaining all the corner cases to test for the next person who tries to modify this script.
author Greg Ward <greg-hg@gerg.ca>
date Sun, 31 May 2009 15:20:31 -0400
parents 9a4fe59b1eca
children 94319ae527cf
line wrap: on
line diff
--- a/tests/test-merge-tools	Fri May 29 22:18:16 2009 -0400
+++ b/tests/test-merge-tools	Sun May 31 15:20:31 2009 -0400
@@ -60,7 +60,9 @@
 echo "# default is internal merge:"
 beforemerge
 echo "# hg merge -r 2"
-PATH=$BINDIR hg merge -r 2
+# override $PATH to ensure hgmerge not visible; use $PYTHON in case we're
+# running from a devel copy, not a temp installation
+PATH=$BINDIR $PYTHON $BINDIR/hg merge -r 2
 aftermerge
 
 echo "# simplest hgrc using false for merge:"