diff options
-rwxr-xr-x | tests/btrfs/test-btrfs-devices.sh | 6 | ||||
-rwxr-xr-x | tests/btrfs/test-btrfs-subvolume-default.pl | 3 | ||||
-rw-r--r-- | tests/charsets/test-charset-fidelity.c | 9 |
3 files changed, 18 insertions, 0 deletions
diff --git a/tests/btrfs/test-btrfs-devices.sh b/tests/btrfs/test-btrfs-devices.sh index d1f1ce73..bba79837 100755 --- a/tests/btrfs/test-btrfs-devices.sh +++ b/tests/btrfs/test-btrfs-devices.sh @@ -26,6 +26,12 @@ set -e guestfish=../../fish/guestfish +# Allow the test to be skipped since btrfs is often broken. +if [ -n "$SKIP_TEST_BTRFS_DEVICES_SH" ]; then + echo "$0: skipping test because environment variable is set." + exit 77 +fi + # If btrfs is not available, bail. if ! $guestfish -a /dev/null run : available btrfs; then echo "$0: skipping test because btrfs is not available" diff --git a/tests/btrfs/test-btrfs-subvolume-default.pl b/tests/btrfs/test-btrfs-subvolume-default.pl index 1eb36768..b9557139 100755 --- a/tests/btrfs/test-btrfs-subvolume-default.pl +++ b/tests/btrfs/test-btrfs-subvolume-default.pl @@ -24,6 +24,9 @@ use warnings; use Sys::Guestfs; use Sys::Guestfs::Lib qw(feature_available); +# Allow the test to be skipped since btrfs is often broken. +exit 77 if $ENV{SKIP_TEST_BTRFS_SUBVOLUME_DEFAULT_PL}; + my $testimg = "test1.img"; unlink $testimg; diff --git a/tests/charsets/test-charset-fidelity.c b/tests/charsets/test-charset-fidelity.c index 7332c542..b358f2cd 100644 --- a/tests/charsets/test-charset-fidelity.c +++ b/tests/charsets/test-charset-fidelity.c @@ -77,12 +77,21 @@ static int feature_available (guestfs_h *g, const char *feature); int main (int argc, char *argv[]) { + char *str; guestfs_h *g; char tmp[] = "/tmp/charsetXXXXXX"; int fd; size_t i; struct filesystem *fs; + /* Allow this test to be skipped. */ + str = getenv ("SKIP_TEST_CHARSET_FIDELITY"); + if (str && STREQ (str, "1")) { + printf ("%s: test skipped because environment variable is set.\n", + argv[0]); + exit (77); + } + g = guestfs_create (); if (g == NULL) error (EXIT_FAILURE, 0, "failed to create handle"); |