From 3c843c291c6890f048026223b3beed8413131234 Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Wed, 12 Aug 2009 14:27:26 +0000 Subject: run test suite on sources instead of on installed files --- 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) -- cgit v0.9.1