mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
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:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user