Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha@silbe.org>2009-08-12 14:27:26 (GMT)
committer Sascha Silbe <sascha@silbe.org>2009-08-13 22:36:17 (GMT)
commit3c843c291c6890f048026223b3beed8413131234 (patch)
tree57363c0f363e9f5d87e17c7aa4847dde48eddb39
parent3252c28a6d7f58c4e92b4e6e86ed3c549769a921 (diff)
run test suite on sources instead of on installed files
-rw-r--r--tests/Makefile2
-rwxr-xr-xtests/runalltests.py10
2 files changed, 12 insertions, 0 deletions
diff --git a/tests/Makefile b/tests/Makefile
index f296619..8de2fa9 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,6 +1,8 @@
all: clean test
test:
+ # bad hack to make Python extensions work from source directory
+ cp ../src/carquinyol/.libs/*.so ../src/carquinyol/
@./runalltests.py
valgrind:
diff --git a/tests/runalltests.py b/tests/runalltests.py
index cf1677b..e5dada6 100755
--- a/tests/runalltests.py
+++ b/tests/runalltests.py
@@ -33,6 +33,16 @@ def setup():
Sets HOME and creates a new process group so we can clean up easily later.
"""
os.environ['HOME'] = tempfile.mkdtemp(prefix='datastore-test')
+ if 'PYTHONPATH' in os.environ :
+ python_path = os.environ.get('PYTHONPATH').split(':')
+ else :
+ python_path = []
+
+ # Run tests on sources instead of on installed files.
+ python_path = [os.path.abspath('../src')] + python_path
+ os.environ['PYTHONPATH'] = ':'.join(python_path)
+ os.environ['PATH'] = os.path.abspath('../bin')+':'+os.environ['PATH']
+
os.setpgid(0, 0)
# prevent suicide in cleanup()
signal.signal(signal.SIGTERM, signal.SIG_IGN)