[parted-devel] [PATCH] tests: skip tests requiring mkfs.hfs if it is not available
Petr Uzel
petr.uzel at suse.cz
Mon Mar 1 15:09:22 UTC 2010
Testsuite fails if mkfs.hfs is not installed on the system.
* tests/t-lib.sh (_require_hfs): New function. The mkfs.hfs does
not provide any option like --version, so 'which mkfs.hfs' is
is used instead.
* tests/t3000-resize-fs.sh: Use _require_hfs
---
tests/t-lib.sh | 6 ++++++
tests/t3000-resize-fs.sh | 1 +
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/tests/t-lib.sh b/tests/t-lib.sh
index 73454ce..280f876 100644
--- a/tests/t-lib.sh
+++ b/tests/t-lib.sh
@@ -54,6 +54,12 @@ require_acl_()
|| skip_test_ "This test requires a local user named bin."
}
+require_hfs_()
+{
+ which mkfs.hfs > /dev/null 2>&1 \
+ || skip_test_ "This test requires HFS support."
+}
+
# Skip this test if we're not in SELinux "enforcing" mode.
require_selinux_enforcing_()
{
diff --git a/tests/t3000-resize-fs.sh b/tests/t3000-resize-fs.sh
index d6af67d..4d0f5cb 100755
--- a/tests/t3000-resize-fs.sh
+++ b/tests/t3000-resize-fs.sh
@@ -23,6 +23,7 @@ fi
: ${srcdir=.}
. $srcdir/t-lib.sh
+require_hfs_
require_root_
require_scsi_debug_module_
--
1.6.4.2
Petr
--
Petr Uzel, openSUSE Boosters Team
IRC: ptr_uzl @ freenode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/parted-devel/attachments/20100301/2f088bb5/attachment.pgp>
More information about the parted-devel
mailing list