From 6c2bbad199458562488fc249c10a6fa371d476f6 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 25 Jan 2011 16:36:28 +0100 Subject: [PATCH] tests: skip non-compiled libmount tests Signed-off-by: Karel Zak --- tests/ts/libmount/context | 2 ++ tests/ts/libmount/context-utab | 2 ++ tests/ts/libmount/lock | 2 ++ tests/ts/libmount/optstr | 2 ++ tests/ts/libmount/tabfiles | 2 ++ tests/ts/libmount/tabfiles-tags | 2 ++ tests/ts/libmount/update | 2 ++ tests/ts/libmount/utils | 2 ++ 8 files changed, 16 insertions(+) diff --git a/tests/ts/libmount/context b/tests/ts/libmount/context index 536ab1b5..4248f313 100755 --- a/tests/ts/libmount/context +++ b/tests/ts/libmount/context @@ -14,6 +14,8 @@ LABEL=libmount-test UUID=$(uuidgen) MOUNTPOINT="$TS_MOUNTPOINT" +[ -x $TESTPROG ] || ts_skip "test not compiled" + modprobe --dry-run --quiet scsi_debug [ "$?" == 0 ] || ts_skip "missing scsi_debug module" diff --git a/tests/ts/libmount/context-utab b/tests/ts/libmount/context-utab index db039d1f..5f36d28a 100755 --- a/tests/ts/libmount/context-utab +++ b/tests/ts/libmount/context-utab @@ -14,6 +14,8 @@ LABEL=libmount-test UUID=$(uuidgen) MOUNTPOINT="$TS_MOUNTPOINT" +[ -x $TESTPROG ] || ts_skip "test not compiled" + modprobe --dry-run --quiet scsi_debug [ "$?" == 0 ] || ts_skip "missing scsi_debug module" diff --git a/tests/ts/libmount/lock b/tests/ts/libmount/lock index 1230e5cc..a6a0a60d 100755 --- a/tests/ts/libmount/lock +++ b/tests/ts/libmount/lock @@ -10,6 +10,8 @@ ts_init "$*" TESTPROG="$TS_HELPER_LIBMOUNT_LOCK" +[ -x $TESTPROG ] || ts_skip "test not compiled" + # # Be careful with number of processes. Don't forget that there is time limit # when the mount waits on the mtab lock. If you define too much processes some diff --git a/tests/ts/libmount/optstr b/tests/ts/libmount/optstr index a58eaaa7..447c7e0a 100755 --- a/tests/ts/libmount/optstr +++ b/tests/ts/libmount/optstr @@ -10,6 +10,8 @@ ts_init "$*" TESTPROG="$TS_HELPER_LIBMOUNT_OPTSTR" +[ -x $TESTPROG ] || ts_skip "test not compiled" + ts_init_subtest "append" $TESTPROG --append "aaa,bbb=BBB,context=\"foo,bar,gogo\",ccc" "ddd" &> $TS_OUTPUT ts_finalize_subtest diff --git a/tests/ts/libmount/tabfiles b/tests/ts/libmount/tabfiles index 2de86807..cf3fb5cd 100755 --- a/tests/ts/libmount/tabfiles +++ b/tests/ts/libmount/tabfiles @@ -10,6 +10,8 @@ ts_init "$*" TESTPROG="$TS_HELPER_LIBMOUNT_TAB" +[ -x $TESTPROG ] || ts_skip "test not compiled" + ts_init_subtest "parse-fstab" $TESTPROG --parse "$TS_SELF/files/fstab" &> $TS_OUTPUT sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT diff --git a/tests/ts/libmount/tabfiles-tags b/tests/ts/libmount/tabfiles-tags index da76724b..893c65bc 100755 --- a/tests/ts/libmount/tabfiles-tags +++ b/tests/ts/libmount/tabfiles-tags @@ -9,6 +9,8 @@ ts_skip_nonroot TESTPROG="$TS_HELPER_LIBMOUNT_TAB" +[ -x $TESTPROG ] || ts_skip "test not compiled" + # # Init device # diff --git a/tests/ts/libmount/update b/tests/ts/libmount/update index 65e0ea52..bbe19ffd 100755 --- a/tests/ts/libmount/update +++ b/tests/ts/libmount/update @@ -10,6 +10,8 @@ ts_init "$*" TESTPROG="$TS_HELPER_LIBMOUNT_UPDATE" +[ -x $TESTPROG ] || ts_skip "test not compiled" + # IMPORTANT notes: # # - the $TS_OUTPUT variable is between ts_init_subtest and ts_finalize_subtest diff --git a/tests/ts/libmount/utils b/tests/ts/libmount/utils index e06c9b9c..fbd63593 100755 --- a/tests/ts/libmount/utils +++ b/tests/ts/libmount/utils @@ -10,6 +10,8 @@ ts_init "$*" TESTPROG="$TS_HELPER_LIBMOUNT_UTILS" +[ -x $TESTPROG ] || ts_skip "test not compiled" + ts_init_subtest "match-fstype" $TESTPROG --match-fstype ext3 "ext2,ext3,cifs" &> $TS_OUTPUT ts_finalize_subtest -- 2.39.5