summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-06-22 08:41:14 +0100
committerRichard W.M. Jones <rjones@redhat.com>2012-06-22 10:57:47 +0100
commit145f35badfd9ca4a6d9f54f7732566a5e5114876 (patch)
tree08c92122cb693a8270dbe63b60a63d011c4a2880
parent6352953ea927819a8ece795d03c4938e657d0a97 (diff)
downloadlibguestfs-145f35badfd9ca4a6d9f54f7732566a5e5114876.tar.gz
libguestfs-145f35badfd9ca4a6d9f54f7732566a5e5114876.tar.xz
libguestfs-145f35badfd9ca4a6d9f54f7732566a5e5114876.zip
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.
-rwxr-xr-xfuse/test-fuse.sh5
-rwxr-xr-xsysprep/test-virt-sysprep-script.sh5
-rwxr-xr-xtests/md/test-inspect-fstab-md.sh5
-rwxr-xr-xtests/md/test-list-filesystems.sh5
-rwxr-xr-xtests/md/test-list-md-devices.sh5
-rwxr-xr-xtests/md/test-mdadm.sh5
-rwxr-xr-xtests/ntfsclone/test-ntfsclone.sh5
-rwxr-xr-xtests/regressions/rhbz690819.sh5
8 files changed, 40 insertions, 0 deletions
diff --git a/fuse/test-fuse.sh b/fuse/test-fuse.sh
index 3dac2336..8dc658bb 100755
--- a/fuse/test-fuse.sh
+++ b/fuse/test-fuse.sh
@@ -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
diff --git a/sysprep/test-virt-sysprep-script.sh b/sysprep/test-virt-sysprep-script.sh
index 36a7ab86..09c42aff 100755
--- a/sysprep/test-virt-sysprep-script.sh
+++ b/sysprep/test-virt-sysprep-script.sh
@@ -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
diff --git a/tests/md/test-inspect-fstab-md.sh b/tests/md/test-inspect-fstab-md.sh
index 1804d33e..a64cbe09 100755
--- a/tests/md/test-inspect-fstab-md.sh
+++ b/tests/md/test-inspect-fstab-md.sh
@@ -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.
diff --git a/tests/md/test-list-filesystems.sh b/tests/md/test-list-filesystems.sh
index b9a03408..f52afb00 100755
--- a/tests/md/test-list-filesystems.sh
+++ b/tests/md/test-list-filesystems.sh
@@ -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:
diff --git a/tests/md/test-list-md-devices.sh b/tests/md/test-list-md-devices.sh
index 99283be5..ad9e5b54 100755
--- a/tests/md/test-list-md-devices.sh
+++ b/tests/md/test-list-md-devices.sh
@@ -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
diff --git a/tests/md/test-mdadm.sh b/tests/md/test-mdadm.sh
index 620dcfd9..91fcca3d 100755
--- a/tests/md/test-mdadm.sh
+++ b/tests/md/test-mdadm.sh
@@ -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
diff --git a/tests/ntfsclone/test-ntfsclone.sh b/tests/ntfsclone/test-ntfsclone.sh
index 2dc4fe8b..999cbfbf 100755
--- a/tests/ntfsclone/test-ntfsclone.sh
+++ b/tests/ntfsclone/test-ntfsclone.sh
@@ -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
diff --git a/tests/regressions/rhbz690819.sh b/tests/regressions/rhbz690819.sh
index 9d8e38ca..e3f9bb89 100755
--- a/tests/regressions/rhbz690819.sh
+++ b/tests/regressions/rhbz690819.sh
@@ -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