|
|
f6faf3 |
From 6b6c4d881dc6fc99f949dac4aaf9a513542f9956 Mon Sep 17 00:00:00 2001
|
|
|
f6faf3 |
Message-Id: <6b6c4d881dc6fc99f949dac4aaf9a513542f9956.1571920849.git.pmatilai@redhat.com>
|
|
|
f6faf3 |
From: Panu Matilainen <pmatilai@redhat.com>
|
|
|
f6faf3 |
Date: Wed, 3 Oct 2018 15:22:55 +0300
|
|
|
f6faf3 |
Subject: [PATCH 1/5] Honor PYTHON from configure when running tests
|
|
|
f6faf3 |
|
|
|
f6faf3 |
Pass PYTHON from configure down through all the nutty layers of make
|
|
|
f6faf3 |
to allow running test-suite with Python 3. In theory that is.
|
|
|
f6faf3 |
|
|
|
f6faf3 |
(cherry picked from commit dcd5ab67c40b543f22b07df8c1028c34b94a7929)
|
|
|
f6faf3 |
---
|
|
|
f6faf3 |
tests/Makefile.am | 1 +
|
|
|
f6faf3 |
tests/atlocal.in | 3 ++-
|
|
|
f6faf3 |
tests/local.at | 2 +-
|
|
|
f6faf3 |
3 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
f6faf3 |
|
|
|
f6faf3 |
diff --git a/tests/Makefile.am b/tests/Makefile.am
|
|
|
f6faf3 |
index eaf817cc2..21ca216a8 100644
|
|
|
f6faf3 |
--- a/tests/Makefile.am
|
|
|
f6faf3 |
+++ b/tests/Makefile.am
|
|
|
f6faf3 |
@@ -117,6 +117,7 @@ atlocal: atlocal.in Makefile
|
|
|
f6faf3 |
-e "s,[@]usrlibdir[@],$(libdir)," \
|
|
|
f6faf3 |
-e "s,[@]execprefix[@],$(exec_prefix)," \
|
|
|
f6faf3 |
-e "s,[@]RPMCONFIGDIR[@],$(rpmconfigdir)," \
|
|
|
f6faf3 |
+ -e "s,[@]PYTHON[@],$(PYTHON)," \
|
|
|
f6faf3 |
< $(srcdir)/atlocal.in > atlocal
|
|
|
f6faf3 |
DISTCLEANFILES = atlocal
|
|
|
f6faf3 |
EXTRA_DIST += atlocal.in
|
|
|
f6faf3 |
diff --git a/tests/atlocal.in b/tests/atlocal.in
|
|
|
f6faf3 |
index d7d837f45..3b1474b56 100644
|
|
|
f6faf3 |
--- a/tests/atlocal.in
|
|
|
f6faf3 |
+++ b/tests/atlocal.in
|
|
|
f6faf3 |
@@ -3,7 +3,8 @@ export LD_LIBRARY_PATH
|
|
|
f6faf3 |
PATH="${abs_builddir}/testing@rpmbindir@:${abs_builddir}/testing@usrbindir@:$PATH"
|
|
|
f6faf3 |
export PATH
|
|
|
f6faf3 |
|
|
|
f6faf3 |
-PYLIBDIR=`python -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1,0,'@execprefix@'))"`
|
|
|
f6faf3 |
+PYTHON=@PYTHON@
|
|
|
f6faf3 |
+PYLIBDIR=$(${PYTHON} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1,0,'@execprefix@'))")
|
|
|
f6faf3 |
PYTHONPATH="${abs_builddir}/testing${PYLIBDIR}"
|
|
|
f6faf3 |
export PYTHONPATH
|
|
|
f6faf3 |
|
|
|
f6faf3 |
diff --git a/tests/local.at b/tests/local.at
|
|
|
f6faf3 |
index 48c5d3f96..4952b9d61 100644
|
|
|
f6faf3 |
--- a/tests/local.at
|
|
|
f6faf3 |
+++ b/tests/local.at
|
|
|
f6faf3 |
@@ -17,7 +17,7 @@ def myprint(msg = ''):
|
|
|
f6faf3 |
sys.stdout.write('%s\n' % msg)
|
|
|
f6faf3 |
$1
|
|
|
f6faf3 |
EOF
|
|
|
f6faf3 |
-python test.py
|
|
|
f6faf3 |
+${PYTHON} test.py
|
|
|
f6faf3 |
]])
|
|
|
f6faf3 |
|
|
|
f6faf3 |
m4_define([RPMPY_CHECK],[
|
|
|
f6faf3 |
--
|
|
|
f6faf3 |
2.21.0
|
|
|
f6faf3 |
|