]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Print fakerootdir when it's preserved
authorAndrea Bolognani <abologna@redhat.com>
Wed, 1 Mar 2023 10:11:23 +0000 (11:11 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Fri, 3 Mar 2023 12:52:37 +0000 (13:52 +0100)
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>
Reviewed-by: Laine Stump <laine@redhat.com>
tests/testutils.c

index e717895fbf12fa6c558f8dbb2abbb0affe6bc750..e8cb8e67375850e66c53bdd42e62597205e46f68 100644 (file)
@@ -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,