Guix system users need to use guix shell and the provided
scripts/manifest.scm to do local builds and testing.
However 'guix shell --container' doesn't have /usr/bin/env, so tests
don't work if we rely on what is in the sheebang (#!).
In various Makefile.am we had:
PY_LOG_COMPILER = $(PYTHON)
but PYTHON was undefined, so for some reasons that made 'make check'
rely on the sheebang instead of just using 'python'.
With this fix, with
'guix shell --pure --container -f scripts/manifest.scm',
./configure now properly detect the 'python3' that is in the path:
Interpreters paths:
PYTHON3..................: python3
And 'python3' is then used to run the python test scripts, which makes
then makes 'make check' succeed.
Signed-off-by: Denis 'GNUtoo' Carikli <[email protected]>
---
configure.ac | 10 ++++++++++
samsung-ipc/tests/Makefile.am | 2 +-
tools/Makefile.am | 2 +-
tools/ipc-modem/Makefile.am | 2 +-
4 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 8dd7400..f53a55d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -28,6 +28,11 @@ AC_SUBST(OPENSSL_LIBS)
# strict cflags
AC_SUBST(STRICT_CFLAGS)
+#------------------------------------------------------------------------------
+# python
+AC_SUBST(PYTHON3)
+AC_CHECK_PROG([PYTHON3], [python3], [python3])
+
#------------------------------------------------------------------------------
# valgrind
AC_SUBST(VALGRIND)
@@ -133,6 +138,11 @@ echo
echo " CFLAGS..................: $CFLAGS $STRICT_CFLAGS"
echo
echo
+echo "Interpreters paths:"
+echo
+echo " PYTHON3..................: $PYTHON3"
+echo
+echo
echo "Configuration Options:"
echo
echo " debug build.............: $debug"
diff --git a/samsung-ipc/tests/Makefile.am b/samsung-ipc/tests/Makefile.am
index 8a2e96e..494be9a 100644
--- a/samsung-ipc/tests/Makefile.am
+++ b/samsung-ipc/tests/Makefile.am
@@ -32,7 +32,7 @@ libsamsung_ipc_test_LDFLAGS =
if WANT_VALGRIND_CHECKING
AM_TESTS_ENVIRONMENT = VALGRIND='$(VALGRIND)'; export VALGRIND;
endif
-PY_LOG_COMPILER = $(PYTHON)
+PY_LOG_COMPILER = $(PYTHON3)
TEST_EXTENSIONS = .py
TESTS = libsamsung-ipc-test.py
EXTRA_DIST += $(TESTS)
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 3183499..911ea30 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -22,7 +22,7 @@ bin_PROGRAMS = \
if WANT_VALGRIND_CHECKING
AM_TESTS_ENVIRONMENT = VALGRIND='$(VALGRIND)'; export VALGRIND;
endif
-PY_LOG_COMPILER = $(PYTHON)
+PY_LOG_COMPILER = $(PYTHON3)
TEST_EXTENSIONS = .py
TESTS = \
tests/nv_data-imei.py \
diff --git a/tools/ipc-modem/Makefile.am b/tools/ipc-modem/Makefile.am
index cd9fc2b..efced7e 100644
--- a/tools/ipc-modem/Makefile.am
+++ b/tools/ipc-modem/Makefile.am
@@ -13,7 +13,7 @@ bin_PROGRAMS = ipc-modem
# TODO: Find a way to make test more modular and represent each run of the
# ipc-modem in TEST while having it implemented in a single python file
-PY_LOG_COMPILER = $(PYTHON)
+PY_LOG_COMPILER = $(PYTHON3)
TEST_EXTENSIONS = .py
TESTS = tests/ipc-modem.py
EXTRA_DIST += $(TESTS)
--
2.39.1
_______________________________________________
Replicant mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/replicant