# HG changeset patch # User Greg Ward # Date 2009-06-01 13:18:35 # Node ID 78ab2a12b4d9c406fd4befcef535e5e54b5a438b # Parent ad1907abf8970d4822be728b6136f342defff91f 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.) diff --git a/tests/run-tests.py b/tests/run-tests.py --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -755,9 +755,12 @@ def main(): 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")