master - test: Skip thin tests if thin support is configured out.
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=6e523f01d07d7d819c2f0d9b1595e628ddffea24 Commit: 6e523f01d07d7d819c2f0d9b1595e628ddffea24 Parent: d760669e80f029a4d507e91ad431431b627f5555 Author: Petr Rockai <[email protected]> AuthorDate: Wed Oct 10 00:20:22 2012 +0200 Committer: Petr Rockai <[email protected]> CommitterDate: Wed Oct 10 00:20:22 2012 +0200
test: Skip thin tests if thin support is configured out.
--- test/Makefile.in | 1 + test/api/thin_percent.sh | 2 +- test/lib/aux.sh | 6 ++++++ test/shell/discards-thin.sh | 2 +- test/shell/lvconvert-thin.sh | 2 +- test/shell/lvcreate-thin-snap.sh | 2 +- test/shell/lvcreate-thin.sh | 2 +- 7 files changed, 12 insertions(+), 5 deletions(-)
test/Makefile.in +1 -0
@@ -98,6 +98,7 @@ lib/paths: $(srcdir)/Makefile.in .lib-dir-stamp echo 'abs_srcdir=$(abs_srcdir)' >> $@-t echo 'abs_builddir=$(abs_builddir)' >> $@-t echo 'export DM_UDEV_SYNCHRONISATION=$(dm_udev_synchronisation)' >> $@-t + echo 'export THIN=@THIN@' >> $@-t mv $@-t $@ LIB = lib/not lib/should lib/harness \
test/api/thin_percent.sh +1 -1
@@ -13,7 +13,7 @@ . lib/test -aux target_at_least dm-thin-pool 1 0 0 || skip +aux have_thin 1 0 0 || skip # disable thin_check if not present in system which thin_check || aux lvmconf 'global/thin_check_executable = ""'
test/lib/aux.sh +6 -0
@@ -530,6 +530,12 @@ target_at_least() test "$revision" -ge "$3" 2>/dev/null || return 1 } +have_thin() +{ + target_at_least dm-thin-pool "$@" || exit 1 + test "$THIN" = shared || test "$THIN" = internal || exit 1 +} + test -f DEVICES && devs=$(cat DEVICES) #unset LVM_VALGRIND
test/shell/discards-thin.sh +1 -1
@@ -18,7 +18,7 @@ # # Main # -aux target_at_least dm-thin-pool 1 1 0 || skip +aux have_thin 1 1 0 || skip aux prepare_pvs 2 64
test/shell/lvconvert-thin.sh +1 -1
@@ -15,7 +15,7 @@ # # Main # -aux target_at_least dm-thin-pool 1 0 0 || skip +aux have_thin 1 0 0 || skip aux prepare_pvs 4 64
test/shell/lvcreate-thin-snap.sh +1 -1
@@ -26,7 +26,7 @@ check_lv_field_modules_() # # Main # -aux target_at_least dm-thin-pool 1 0 0 || skip +aux have_thin 1 0 0 || skip aux prepare_pvs 2 64
test/shell/lvcreate-thin.sh +1 -1
@@ -29,7 +29,7 @@ check_lv_field_modules_() # # Main # -aux target_at_least dm-thin-pool 1 0 0 || skip +aux have_thin 1 0 0 || skip aux prepare_pvs 2 64