run-tests: append PYTHONPATH instead of overwriting it
authorPatrick Mezard <pmezard@gmail.com>
Mon, 27 Aug 2007 22:17:51 +0200
changeset 5251 90919a6f5c8f
parent 5250 585471802a01
child 5252 c0281c6b40b0
run-tests: append PYTHONPATH instead of overwriting it Optional dependencies like svn bindings not necessarily live in site-packages.
tests/run-tests.py
--- a/tests/run-tests.py	Mon Aug 27 11:56:53 2007 -0700
+++ b/tests/run-tests.py	Mon Aug 27 22:17:51 2007 +0200
@@ -152,7 +152,13 @@
     os.chdir(TESTDIR)
 
     os.environ["PATH"] = "%s%s%s" % (BINDIR, os.pathsep, os.environ["PATH"])
-    os.environ["PYTHONPATH"] = PYTHONDIR
+
+    pythonpath = os.environ.get("PYTHONPATH")
+    if pythonpath:
+        pythonpath = PYTHONDIR + os.pathsep + pythonpath
+    else:
+        pythonpath = PYTHONDIR
+    os.environ["PYTHONPATH"] = pythonpath
 
     use_correct_python()