mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
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.
(cherry picked from commit 145f35badf)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user