summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tests/Makefile.am4
-rwxr-xr-xsrc/tests/tests.py.in4
2 files changed, 5 insertions, 3 deletions
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index d641dc7..5f61ae1 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -6,7 +6,9 @@ EXTRA_DIST = tests.py.in
CLEANFILES = $(check_SCRIPTS)
tests.py: tests.py.in
- $(AM_V_GEN) sed -e 's|@PYTHON[@]|$(PYTHON)|g' $< > $@
+ $(AM_V_GEN) sed -e 's|@PYTHON[@]|$(PYTHON)|g' \
+ -e 's|@DATA_DIR[@]|$(top_srcdir)/data|g' \
+ -e 's|@SRC_DIR[@]|$(top_srcdir)|g' $< > $@
chmod +x $@
# Default pycodestyle --exclude + emacs backup files
diff --git a/src/tests/tests.py.in b/src/tests/tests.py.in
index 93cef12..35b1f55 100755
--- a/src/tests/tests.py.in
+++ b/src/tests/tests.py.in
@@ -3,7 +3,7 @@
import sys
import os
import tempfile
-sys.path.insert(0, os.path.abspath(os.path.join(__file__, "../../")))
+sys.path.insert(0, os.path.abspath(os.path.join(__file__, "@SRC_DIR@")))
from gi.repository import Gtk
from gi.repository import Gio
@@ -35,7 +35,7 @@ XML = """
</node>
"""
-DATA_DIR = os.path.abspath("../../data/")
+DATA_DIR = os.path.abspath("@DATA_DIR@")
class IntrospectionHelperTest(unittest.TestCase):