[Libguestfs] [PATCH 44/67] tests/regressions: Allow regression test for bug 914931 to be skipped.

Richard W.M. Jones rjones at redhat.com
Sat Aug 24 11:04:44 UTC 2013


From: "Richard W.M. Jones" <rjones at redhat.com>

(cherry picked from commit 071d7fb6d703a1184af93ff2e9ee1812606bd16e)
---
 tests/regressions/rhbz914931.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/regressions/rhbz914931.c b/tests/regressions/rhbz914931.c
index c33ab3c..faa3dd2 100644
--- a/tests/regressions/rhbz914931.c
+++ b/tests/regressions/rhbz914931.c
@@ -37,6 +37,15 @@ main (int argc, char *argv[])
 {
   guestfs_h *g;
   int r;
+  char *str;
+
+  /* Allow this test to be skipped. */
+  str = getenv ("SKIP_TEST_RHBZ914931");
+  if (str && STREQ (str, "1")) {
+    printf ("%s: test skipped because environment variable is set.\n",
+            program_name);
+    exit (77);
+  }
 
   g = guestfs_create ();
   if (!g) {
-- 
1.8.3.1




More information about the Libguestfs mailing list