tests: Add SKIP_TEST_* variables to allow these tests to be skipped.

By setting these variables, we can skip tests that fail on
RHEL 5.
This commit is contained in:
Richard W.M. Jones
2012-06-22 08:41:14 +01:00
parent 6352953ea9
commit 145f35badf
8 changed files with 40 additions and 0 deletions

View File

@@ -20,6 +20,11 @@ unset CDPATH
set -e
#set -v
if [ -n "$SKIP_TEST_FUSE_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
if [ ! -w /dev/fuse ]; then
echo "SKIPPING guestmount test, because there is no /dev/fuse."
exit 0

View File

@@ -20,6 +20,11 @@ export LANG=C
set -e
#set -x
if [ -n "$SKIP_TEST_VIRT_SYSPREP_SCRIPT_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
if [ ! -w /dev/fuse ]; then
echo "$0: SKIPPING test, because there is no /dev/fuse."
exit 0

View File

@@ -21,6 +21,11 @@
set -e
export LANG=C
if [ -n "$SKIP_TEST_INSPECT_FSTAB_MD_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
# The first test requires a new Augeas lens for parsing mdadm.conf.
# If this is not present in the appliance or on the host, skip the
# test.

View File

@@ -20,6 +20,11 @@
set -e
if [ -n "$SKIP_TEST_LIST_FILESYSTEMS_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
rm -f test.output
# Create 2 disks partitioned as:

View File

@@ -20,6 +20,11 @@
set -e
if [ -n "$SKIP_TEST_LIST_MD_DEVICES_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
output=$(
../../fish/guestfish <<EOF
# Add 2 empty disks

View File

@@ -20,6 +20,11 @@
set -e
if [ -n "$SKIP_TEST_MDADM_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
rm -f md-test1.img md-test2.img md-test3.img md-test4.img
../../fish/guestfish <<EOF

View File

@@ -20,6 +20,11 @@
set -e
if [ -n "$SKIP_TEST_NTFSCLONE_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
rm -f test1.img backup1 backup2
guestfish=../../fish/guestfish

View File

@@ -35,6 +35,11 @@
set -e
export LANG=C
if [ -n "$SKIP_TEST_RHBZ690819_SH" ]; then
echo "$0: test skipped because environment variable is set."
exit 0
fi
rm -f test.img
../../fish/guestfish sparse test.img 100M