X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;ds=sidebyside;f=tests.c;h=a4e7d476d03d98a61f9487e6bc581c359f1227e3;hb=d215800f10314dd5019d8d171961f8b97a35e817;hp=19a37757e8818b0e16bc16c380935c06fa7eec94;hpb=1fc41b39dac877ccec1284da8bb14baa4df368b8;p=libguestfs.git diff --git a/tests.c b/tests.c index 19a3775..a4e7d47 100644 --- a/tests.c +++ b/tests.c @@ -643,8 +643,15 @@ static int test_lvresize_0 (void) return 0; } +static int test_zerofree_0_prereq (void) +{ + const char *str = getenv ("SKIP_ZEROFREE"); + return str && strcmp (str, "1") == 0; +} + static int test_zerofree_0 (void) { + if (! test_zerofree_0_prereq ()) { /* InitNone|InitEmpty for test_zerofree_0 */ { char device[] = "/dev/sda"; @@ -755,6 +762,8 @@ static int test_zerofree_0 (void) } free (r); } + } else + printf ("%s skipped (reason: test prerequisite)\n", "test_zerofree_0"); return 0; }