From a731b5413b9736b71b12f4505b5c0e7985f77be7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 19 Aug 2013 15:35:52 +0200 Subject: tests: consolidate Py tests initialization Signed-off-by: Karel Zak --- tests/functions.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'tests/functions.sh') 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 $* -- cgit v1.2.3-55-g7522