run-tests: don't replace PYTHONPATH, just augment it.
(Needed at least for Subversion bindings on OS X, which are in
/opt/subversion. Useful for other external libraries installed in
non-standard places too.)
--- a/tests/run-tests.py Mon Jun 01 01:24:01 2009 +0200
+++ b/tests/run-tests.py Mon Jun 01 09:18:35 2009 -0400
@@ -755,9 +755,12 @@
path = [BINDIR] + os.environ["PATH"].split(os.pathsep)
os.environ["PATH"] = os.pathsep.join(path)
- # Deliberately override existing PYTHONPATH: do not want success
- # to depend on what happens to be in caller's environment.
- os.environ["PYTHONPATH"] = PYTHONDIR
+ # We have to augment PYTHONPATH, rather than simply replacing
+ # it, in case external libraries are only available via current
+ # PYTHONPATH. (In particular, the Subversion bindings on OS X
+ # are in /opt/subversion.)
+ os.environ["PYTHONPATH"] = (PYTHONDIR + os.pathsep +
+ os.environ.get("PYTHONPATH", ""))
COVERAGE_FILE = os.path.join(TESTDIR, ".coverage")