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-11-06 12:18:55 (GMT)
committer Sascha Silbe <sascha@silbe.org>2009-11-06 12:18:55 (GMT)
commitb83d3b2bfaa078da8d222e100745eefe015d3da4 (patch)
treec93650264dba7529d6b2e1daa4fbb935d1ed36c4
parentc63c3c07f2536d50ba030db565c8a0a1f8fa4c4a (diff)
fix uninstalled testing (dbus service file, dbus service binary)
-rw-r--r--tests/Makefile1
-rwxr-xr-xtests/runalltests.py19
2 files changed, 16 insertions, 4 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 038b84c..5ef30e6 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -1,5 +1,6 @@
all:
install:
+uninstall:
check:
# bad hack to make Python extensions work from source directory
diff --git a/tests/runalltests.py b/tests/runalltests.py
index 3d64e17..93383bc 100755
--- a/tests/runalltests.py
+++ b/tests/runalltests.py
@@ -42,9 +42,7 @@ ENVIRONMENT_WHITELIST = [
'LD_LIBRARY_PATH',
'MALLOC_CHECK_',
'MASSOPS_RUNS',
- 'PATH',
'SUGAR_LOGGER_LEVEL',
- 'XDG_DATA_DIRS'
]
def setup():
@@ -65,9 +63,22 @@ def setup():
python_path = []
# Run tests on sources instead of on installed files.
- python_path = [os.path.abspath('../src')] + python_path
+ basedir = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), '..')
+ python_path = [os.path.join(basedir, 'src')] + python_path
environment['PYTHONPATH'] = ':'.join(python_path)
- environment['PATH'] = os.path.abspath('../bin')+':'+os.environ['PATH']
+ environment['PATH'] = os.path.join(basedir, 'bin')+':'+os.environ['PATH']
+
+ servicedir = os.path.join(environment['HOME'], 'dbus-1', 'services')
+ servicepath = os.path.join(servicedir, 'org.laptop.sugar.DataStore.service')
+ os.makedirs(servicedir)
+ servicefile = file(servicepath, 'w')
+ servicefile.write("""
+ [D-BUS Service]
+ Name = org.laptop.sugar.DataStore
+ Exec = %s/bin/datastore-service
+ """.replace(' ', '') % (basedir, ))
+ servicefile.close()
+ environment['XDG_DATA_DIRS'] = environment['HOME']
os.setpgid(0, 0)
# prevent suicide in cleanup()