diff options
author | Karel Zak | 2013-08-19 15:35:52 +0200 |
---|---|---|
committer | Karel Zak | 2013-08-19 15:35:52 +0200 |
commit | a731b5413b9736b71b12f4505b5c0e7985f77be7 (patch) | |
tree | e6c585de0ca772fc45cf60b568a6f6801cce77f1 /tests/functions.sh | |
parent | build-sys: install pylibmount into (diff) | |
download | kernel-qcow2-util-linux-a731b5413b9736b71b12f4505b5c0e7985f77be7.tar.gz kernel-qcow2-util-linux-a731b5413b9736b71b12f4505b5c0e7985f77be7.tar.xz kernel-qcow2-util-linux-a731b5413b9736b71b12f4505b5c0e7985f77be7.zip |
tests: consolidate Py tests initialization
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests/functions.sh')
-rw-r--r-- | tests/functions.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/functions.sh b/tests/functions.sh index 2ca98f8ca..361ab7075 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -242,6 +242,15 @@ function ts_init_suid { chmod u+s $PROG &> /dev/null } +function ts_init_py { + LIBNAME="$1" + + [ -f "$TS_TOPDIR/../$LIBNAME.la" ] || ts_skip "py$LIBNAME not compiled" + + export LD_LIBRARY_PATH="$TS_TOPDIR/../.libs" + export PYTHONPATH="$TS_TOPDIR/../$LIBNAME/python:$TS_TOPDIR/../.libs" +} + function ts_valgrind { if [ -z "$TS_VALGRIND_CMD" ]; then $* |