summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2021-08-02 13:58:22 -0400
committerPeter Jones <pjones@redhat.com>2021-09-07 17:05:04 -0400
commit284f30607aaaab3a8ad502c557e31f7f5dbc0b64 (patch)
treea6099976f13be0d15fa8c63ef5be29b23add2e9a
parent6ea93a28759d754778e483f86f95587a01c5fee8 (diff)
downloadefi-boot-shim-284f30607aaaab3a8ad502c557e31f7f5dbc0b64.tar.gz
efi-boot-shim-284f30607aaaab3a8ad502c557e31f7f5dbc0b64.zip
tests: clean up temp data after running tests
This makes sure we clean up the builds that aren't for the EFI environment after we build and run the unit tests. Signed-off-by: Peter Jones <pjones@redhat.com>
-rw-r--r--Makefile4
-rw-r--r--include/test.mk9
2 files changed, 8 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index f4aad593..097cbd30 100644
--- a/Makefile
+++ b/Makefile
@@ -287,14 +287,14 @@ else
$(PESIGN) -n certdb -i $< -c "shim" -s -o $@ -f
endif
-test :
+test test-clean :
@make -f $(TOPDIR)/include/test.mk \
COMPILER="$(COMPILER)" \
CROSS_COMPILE="$(CROSS_COMPILE)" \
CLANG_WARNINGS="$(CLANG_WARNINGS)" \
ARCH_DEFINES="$(ARCH_DEFINES)" \
EFI_INCLUDES="$(EFI_INCLUDES)" \
- all
+ test-clean $@
$(patsubst %.c,%,$(wildcard test-*.c)) :
@make -f $(TOPDIR)/include/test.mk EFI_INCLUDES="$(EFI_INCLUDES)" ARCH_DEFINES="$(ARCH_DEFINES)" $@
diff --git a/include/test.mk b/include/test.mk
index b99283f3..c11d0c74 100644
--- a/include/test.mk
+++ b/include/test.mk
@@ -87,11 +87,14 @@ $(tests) :: test-% : test.c test-%.c $(test-%_FILES)
$(VALGRIND) ./$@
test : $(tests)
+ $(MAKE) -f include/test.mk test-clean
-clean :
- @rm -vf test-random.h random.bin libefi-test.a
+test-clean :
+ @rm -vf test-random.h random.bin libefi-test.a vgcore.*
-all : clean test
+clean : test-clean
+
+all : test-clean test
.PHONY: $(tests) all test clean
.SECONDARY: random.bin