[libvirt PATCH 4/4] tests: Print fakerootdir when it's preserved

Andrea Bolognani posted 4 patches 2 years, 11 months ago
[libvirt PATCH 4/4] tests: Print fakerootdir when it's preserved
Posted by Andrea Bolognani 2 years, 11 months ago
Setting the LIBVIRT_SKIP_CLEANUP environment variable results
in the contents of fakerootdir being preserved for inspection.
Be more helpful towards the developer and print out the path
in this case.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
---
 tests/testutils.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/testutils.c b/tests/testutils.c
index e717895fbf..e8cb8e6737 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -790,6 +790,8 @@ virTestFakeRootDirCleanup(char *fakerootdir)
 
     if (!g_getenv("LIBVIRT_SKIP_CLEANUP"))
         virFileDeleteTree(fakerootdir);
+    else
+        fprintf(stderr, "Test data ready for inspection: %s\n", fakerootdir);
 }
 
 int virTestMain(int argc,
-- 
2.39.2