diff options
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | libmount/python/Makemodule.am | 4 | ||||
-rw-r--r-- | tests/commands.sh | 6 | ||||
-rw-r--r-- | tests/functions.sh | 6 | ||||
-rwxr-xr-x | tests/ts/libmount/context-py | 1 | ||||
-rwxr-xr-x | tests/ts/libmount/context-utab-py | 2 | ||||
-rwxr-xr-x | tests/ts/libmount/tabfiles-py | 1 | ||||
-rwxr-xr-x | tests/ts/libmount/tabfiles-tags-py | 2 | ||||
-rwxr-xr-x | tests/ts/libmount/update-py | 3 |
9 files changed, 18 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index 73ec1e2cb..5f99c8c3c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -46,6 +46,7 @@ dist_usrbin_exec_SCRIPTS = systemdsystemunit_DATA = dist_bashcompletion_DATA = check_PROGRAMS = +dist_check_SCRIPTS = TESTS = PATHFILES = diff --git a/libmount/python/Makemodule.am b/libmount/python/Makemodule.am index aeb76d75f..367d32472 100644 --- a/libmount/python/Makemodule.am +++ b/libmount/python/Makemodule.am @@ -26,6 +26,10 @@ pylibmount_la_CFLAGS = \ pylibmount_la_LDFLAGS = \ -avoid-version -module -shared -export-dynamic +dist_check_SCRIPTS += libmount/python/test_mount_context.py +dist_check_SCRIPTS += libmount/python/test_mount_tab.py +dist_check_SCRIPTS += libmount/python/test_mount_tab_update.py + CLEANFILES += *.img endif # BUILD_PYLIBMOUNT diff --git a/tests/commands.sh b/tests/commands.sh index b541af0ae..06450a367 100644 --- a/tests/commands.sh +++ b/tests/commands.sh @@ -13,9 +13,9 @@ TS_HELPER_LIBMOUNT_TABDIFF="$top_builddir/test_mount_tab_diff" TS_HELPER_LIBMOUNT_TAB="$top_builddir/test_mount_tab" TS_HELPER_LIBMOUNT_UPDATE="$top_builddir/test_mount_tab_update" TS_HELPER_LIBMOUNT_UTILS="$top_builddir/test_mount_utils" -TS_HELPER_PYLIBMOUNT_CONTEXT="$top_builddir/libmount/python/test_mount_context.py" -TS_HELPER_PYLIBMOUNT_TAB="$top_builddir/libmount/python/test_mount_tab.py" -TS_HELPER_PYLIBMOUNT_UPDATE="$top_builddir/libmount/python/test_mount_tab_update.py" +TS_HELPER_PYLIBMOUNT_CONTEXT="$top_srcdir/libmount/python/test_mount_context.py" +TS_HELPER_PYLIBMOUNT_TAB="$top_srcdir/libmount/python/test_mount_tab.py" +TS_HELPER_PYLIBMOUNT_UPDATE="$top_srcdir/libmount/python/test_mount_tab_update.py" TS_HELPER_LOGINDEFS="$top_builddir/test_logindefs" TS_HELPER_MD5="$top_builddir/test_md5" TS_HELPER_MORE=${TS_HELPER_MORE-"$top_builddir/test_more"} diff --git a/tests/functions.sh b/tests/functions.sh index 85f0e0fac..31ad481f4 100644 --- a/tests/functions.sh +++ b/tests/functions.sh @@ -316,10 +316,10 @@ function ts_init_suid { function ts_init_py { LIBNAME="$1" - [ -f "$TS_TOPDIR/../py${LIBNAME}.la" ] || ts_skip "py${LIBNAME} not compiled" + [ -f "$top_builddir/py${LIBNAME}.la" ] || ts_skip "py${LIBNAME} not compiled" - export LD_LIBRARY_PATH="$TS_TOPDIR/../.libs" - export PYTHONPATH="$TS_TOPDIR/../$LIBNAME/python:$TS_TOPDIR/../.libs" + export LD_LIBRARY_PATH="$top_builddir/.libs" + export PYTHONPATH="$top_builddir/$LIBNAME/python:$top_builddir/.libs" export PYTHON_VERSION=$(awk '/^PYTHON_VERSION/ { print $3 }' $top_builddir/Makefile) export PYTHON_MAJOR_VERSION=$(echo $PYTHON_VERSION | sed 's/\..*//') diff --git a/tests/ts/libmount/context-py b/tests/ts/libmount/context-py index e8faa7242..b2355a795 100755 --- a/tests/ts/libmount/context-py +++ b/tests/ts/libmount/context-py @@ -20,6 +20,7 @@ ts_init_py libmount ts_skip_nonroot TESTPROG="$TS_HELPER_PYLIBMOUNT_CONTEXT" +[ -x $TESTPROG ] || ts_die "test script missing" PYDBG="$PYTHON -m pdb" LABEL=libmount-test diff --git a/tests/ts/libmount/context-utab-py b/tests/ts/libmount/context-utab-py index 8f8c37992..00af69554 100755 --- a/tests/ts/libmount/context-utab-py +++ b/tests/ts/libmount/context-utab-py @@ -18,6 +18,8 @@ ts_skip_nonroot TESTPROG="$TS_HELPER_PYLIBMOUNT_CONTEXT" +[ -x $TESTPROG ] || ts_die "test script missing" + LABEL=libmount-test UUID=$($TS_CMD_UUIDGEN) MOUNTPOINT="$TS_MOUNTPOINT" diff --git a/tests/ts/libmount/tabfiles-py b/tests/ts/libmount/tabfiles-py index c5ca1c563..f0c4836d0 100755 --- a/tests/ts/libmount/tabfiles-py +++ b/tests/ts/libmount/tabfiles-py @@ -11,6 +11,7 @@ ts_init_py libmount PYDBG="$PYTHON -m pdb" TESTPROG="$TS_HELPER_PYLIBMOUNT_TAB" +[ -x $TESTPROG ] || ts_die "test script missing" ts_init_subtest "parse-fstab" $PYTHON $TESTPROG --parse "$TS_SELF/files/fstab" &> $TS_OUTPUT diff --git a/tests/ts/libmount/tabfiles-tags-py b/tests/ts/libmount/tabfiles-tags-py index 982cc0001..2f462a0af 100755 --- a/tests/ts/libmount/tabfiles-tags-py +++ b/tests/ts/libmount/tabfiles-tags-py @@ -9,6 +9,8 @@ ts_init_py libmount ts_skip_nonroot TESTPROG="$TS_HELPER_PYLIBMOUNT_TAB" +[ -x $TESTPROG ] || ts_die "test script missing" + ts_check_prog "mkfs.ext3" PYDBG="$PYTHON -m pdb" diff --git a/tests/ts/libmount/update-py b/tests/ts/libmount/update-py index da14b9bae..6493224fb 100755 --- a/tests/ts/libmount/update-py +++ b/tests/ts/libmount/update-py @@ -11,8 +11,7 @@ ts_init_py libmount ts_skip_nonroot TESTPROG="$TS_HELPER_PYLIBMOUNT_UPDATE" - -[ -x $TESTPROG ] || ts_skip "test not compiled" +[ -x $TESTPROG ] || ts_die "test script missing" # # fstab - replace |