[PATCH] tests: libmount: skip tabfiles-py when pylibmount is disabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The default configure disables python support, so this test fails by
default.  Add a simple check for module availability.

Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
---
 tests/ts/libmount/tabfiles-py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/ts/libmount/tabfiles-py b/tests/ts/libmount/tabfiles-py
index 64e8911..b89fb5b 100755
--- a/tests/ts/libmount/tabfiles-py
+++ b/tests/ts/libmount/tabfiles-py
@@ -12,6 +12,8 @@ ts_init_py libmount
 PYDBG="$PYTHON -m pdb"
 TESTPROG="$TS_HELPER_PYLIBMOUNT_TAB"
 
+$PYTHON -c 'import libmount' 2>/dev/null || ts_skip "pylibmount not compiled"
+
 ts_init_subtest "parse-fstab"
 $PYTHON $TESTPROG --parse "$TS_SELF/files/fstab" &> $TS_OUTPUT
 sed -i -e 's/fs: 0x.*/fs:/g' $TS_OUTPUT
-- 
1.8.4.3

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux