]> git.ipfire.org Git - pakfire.git/commitdiff
tests: Test the locally built binaries
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Jan 2024 18:38:55 +0000 (18:38 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Jan 2024 18:38:55 +0000 (18:38 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
src/pakfire/__init__.py

index d064a6d20281f752ef55416b5a8dd1eb527aca20..9e4f33a4602574e4aaa0a212cd06da3c175d6365 100644 (file)
@@ -1135,6 +1135,14 @@ TESTS_ENVIRONMENT = \
        PAKFIRE_LOG=debug \
        topdir="$(shell pwd)"
 
+# Test the library we just built
+TESTS_ENVIRONMENT += \
+       LD_LIBRARY_PATH=$(top_srcdir)/.libs:$(LD_LIBRARY_PATH)
+
+# Test the Python modules we just built
+TESTS_ENVIRONMENT += \
+       PYTHONPATH=$(top_srcdir)/src:$(top_srcdir)/.libs:$(PYTHONPATH)
+
 dist_check_SCRIPTS = \
        tests/python/archive.py \
        tests/python/ctx.py \
index d30bcd679a7e79a53bcb4107d34c3dde6be6ee0a..92264a729b511def824416fed5b3e28b402fe0e3 100644 (file)
@@ -23,4 +23,7 @@
 from .__version__ import PAKFIRE_VERSION as __version__
 
 # Import everything from the C module
-from ._pakfire import *
+try:
+       from ._pakfire import *
+except ImportError:
+       from _pakfire import *