tests: Allow more tests to be skipped.

Specifically tests which involve btrfs, because btrfs is
currently broken upstream (RHBZ#863978).
This commit is contained in:
Richard W.M. Jones
2012-10-30 12:56:06 +00:00
parent eb185eef29
commit f5194e6b0a
3 changed files with 18 additions and 0 deletions

View File

@@ -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"

View File

@@ -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;

View File

@@ -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");