[PATCH libaio 04/16] build: Remove all test artifacts on clean
authorGuillem Jover <guillem@hadrons.org>
Sun, 6 Aug 2023 18:56:10 +0000 (20:56 +0200)
committerGuillem Jover <guillem@debian.org>
Sun, 6 Aug 2023 19:12:34 +0000 (20:12 +0100)
We create these artifacts when running the test suite, so should remove
them when running the clean target.

Reported-by: Lucas Nussbaum <lucas@debian.org>
Signed-off-by: Guillem Jover <guillem@hadrons.org>
Gbp-Pq: Name 0004-build-Remove-all-test-artifacts-on-clean.patch

harness/Makefile

index 8cb27fa2f58db680a1b902b07a4d8dda7eca0919..ae4e45ea5429e820b7e77f8cbea5ce8df8cb445f 100644 (file)
@@ -27,7 +27,9 @@ $(PROGS): %.p: %.t $(HARNESS_SRCS)
        $(CC) $(MK_CPPFLAGS) $(MK_CFLAGS) -DTEST_NAME=\"$<\" -o $@ $(MK_LDFLAGS)
 
 clean:
-       rm -f $(PROGS) *.o runtests.out rofile wofile rwfile
+       rm -f $(PROGS) *.o runtests.out tempfile testfile
+       rm -f testdir/rofile testdir/wofile testdir/rwfile
+       rmdir testdir || true
 
 .PHONY: