From d2da726fe76e61f4c499421d8d2bd588ca41b770 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Thu, 9 Oct 2014 09:08:57 +0200 Subject: Regression test portability: loopback devices Introduce functions to deal with loopback devices setup, mount and umount. Remove test for xfsprogs for non Linux systems, as loopback devices can be populated with other filesystems (e.g.: FFS for NetBSD) While there, remove mount.nfs test for non Linux systems. At least NetBSD has it in base system as mount_nfs. BUG: 1129939 Change-Id: I816b36e1d3e6933f92acf19d9be8eeaaa333356e Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/8914 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- run-tests.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'run-tests.sh') diff --git a/run-tests.sh b/run-tests.sh index 823814db85f..f95c8f978cb 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -31,10 +31,12 @@ function check_dependencies() MISSING="$MISSING rpmbuild" fi - # Check for nfs-utils - env mount.nfs -V > /dev/null 2>&1 - if [ $? -ne 0 ]; then - MISSING="$MISSING nfs-utils" + # Check for nfs-utils (Linux-only: built-in NetBSD with different name) + if [ "x`uname -s`" = "xLinux" ] ; then + env mount.nfs -V > /dev/null 2>&1 + if [ $? -ne 0 ]; then + MISSING="$MISSING nfs-utils" + fi fi # Check for the Perl Test Harness @@ -48,10 +50,12 @@ function check_dependencies() MISSING="$MISSING json_verify" fi - # Check for XFS programs - env mkfs.xfs -V > /dev/null 2>&1 - if [ $? -ne 0 ]; then - MISSING="$MISSING xfsprogs" + # Check for XFS programs (Linux Only: NetBSD does without) + if [ "x`uname -s`" = "xLinux" ] ; then + env mkfs.xfs -V > /dev/null 2>&1 + if [ $? -ne 0 ]; then + MISSING="$MISSING xfsprogs" + fi fi # Check for attr -- cgit