summaryrefslogtreecommitdiffstats
path: root/test/lilv_test_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/lilv_test_utils.c')
-rw-r--r--test/lilv_test_utils.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/test/lilv_test_utils.c b/test/lilv_test_utils.c
index 1cb8d13..ba291d7 100644
--- a/test/lilv_test_utils.c
+++ b/test/lilv_test_utils.c
@@ -8,6 +8,7 @@
#include <zix/allocator.h>
#include <zix/filesystem.h>
#include <zix/path.h>
+#include <zix/status.h>
#include <errno.h>
#include <stdbool.h>
@@ -136,19 +137,28 @@ start_bundle(LilvTestEnv* env,
return 0;
}
+static void
+remove_temporary(const char* const path)
+{
+ const ZixStatus st = zix_remove(path);
+ if (st) {
+ fprintf(stderr, "Failed to remove '%s' (%s)\n", path, zix_strerror(st));
+ }
+}
+
void
delete_bundle(LilvTestEnv* env)
{
if (env->test_content_path) {
- zix_remove(env->test_content_path);
+ remove_temporary(env->test_content_path);
}
if (env->test_manifest_path) {
- zix_remove(env->test_manifest_path);
+ remove_temporary(env->test_manifest_path);
}
if (env->test_bundle_path) {
- remove(env->test_bundle_path);
+ remove_temporary(env->test_bundle_path);
}
zix_free(NULL, env->test_content_path);