summaryrefslogtreecommitdiffstats
path: root/tests/functions.sh
diff options
context:
space:
mode:
authorOndrej Oprala2013-08-29 14:57:04 +0200
committerKarel Zak2013-09-20 12:48:53 +0200
commit464074532c0d1898f945a00c2f143e5b3ca59601 (patch)
treebeb19a7e647b6738c57a822d7c4fdb8992042bb0 /tests/functions.sh
parentbuild-sys: support --with-python[={2,3}] (diff)
downloadkernel-qcow2-util-linux-464074532c0d1898f945a00c2f143e5b3ca59601.tar.gz
kernel-qcow2-util-linux-464074532c0d1898f945a00c2f143e5b3ca59601.tar.xz
kernel-qcow2-util-linux-464074532c0d1898f945a00c2f143e5b3ca59601.zip
pylibmount: rewrite to be py2/py3 universal
Signed-off-by: Ondrej Oprala <ooprala@redhat.com> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r--tests/functions.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/functions.sh b/tests/functions.sh
index 384368b13..b9d0ddf54 100644
--- a/tests/functions.sh
+++ b/tests/functions.sh
@@ -249,6 +249,11 @@ function ts_init_py {
export LD_LIBRARY_PATH="$TS_TOPDIR/../.libs"
export PYTHONPATH="$TS_TOPDIR/../$LIBNAME/python:$TS_TOPDIR/../.libs"
+
+ export PYTHON_VERSION=$(awk '/^PYTHON_VERSION/ { print $3 }' $top_builddir/Makefile)
+ export PYTHON_MAJOR_VERSION=$(echo $PYTHON_VERSION | sed 's/\..*//')
+
+ export PYTHON="python${PYTHON_MAJOR_VERSION}"
}
function ts_valgrind {