summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2015-01-21 08:53:37 +1100
committerAlex Gorrod <alexander.gorrod@mongodb.com>2015-01-21 08:53:37 +1100
commit1d76628056d6a42f10dec8d5baaa35a97a29ccba (patch)
treeb2f1ee4d8772e517b459f8b7df67167c40e99376
parentb766e8cc54886b38ddb364df99958aefc98c6c2c (diff)
parentf11a1c16ae4a0037e78c81d807576775a0dbe3be (diff)
downloadmongo-1d76628056d6a42f10dec8d5baaa35a97a29ccba.tar.gz
Merge pull request #1578 from wiredtiger/python-sys-path
Put the local build directories to the front of the sys path.
-rw-r--r--test/suite/run.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/suite/run.py b/test/suite/run.py
index 63101518bd9..1cb7309cb53 100644
--- a/test/suite/run.py
+++ b/test/suite/run.py
@@ -54,8 +54,10 @@ else:
sys.exit(False)
# Cannot import wiredtiger and supporting utils until we set up paths
-sys.path.append(os.path.join(wt_builddir, 'lang', 'python'))
-sys.path.append(os.path.join(wt_disttop, 'lang', 'python'))
+# We want our local tree in front of any installed versions of WiredTiger.
+# Don't change sys.path[0], it's the dir containing the invoked python script.
+sys.path.insert(1, os.path.join(wt_builddir, 'lang', 'python'))
+sys.path.insert(1, os.path.join(wt_disttop, 'lang', 'python'))
# Add all 3rd party directories: some have code in subdirectories
for d in os.listdir(wt_3rdpartydir):