summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/Makefile b/test/Makefile
index a3f84f35a..fd54fb9c2 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -58,15 +58,16 @@ utils_SRCS := utils/utils.c utils/messages.c utils/hashtable.c \
time_SRCS := utils/time.c test/log.c test/time.c
# Coverage builds need additional flags
+COV_ROOT := build/$(HOST)-coverage
ifeq ($(MAKECMDGOALS),coverage)
COV_CFLAGS ?= -fprofile-arcs -ftest-coverage -O0
COV_CXXFLAGS ?= -fprofile-arcs -ftest-coverage -O0
COV_LDFLAGS ?= -lgcov -fprofile-arcs
- TESTROOT := build-$(HOST)-coverage
+ TESTROOT := $(COV_ROOT)
else
COV_CFLAGS ?= -O0
COV_CXXFLAGS ?= -O0
- TESTROOT := build-$(HOST)-test
+ TESTROOT := build/$(HOST)-test
endif
@@ -165,13 +166,13 @@ coverage: test
$(TESTROOT)/created:
$(VQ)echo " MKDIR: $(TESTROOT)"
- $(Q)$(MKDIR) $(TESTROOT)
+ $(Q)$(MKDIR) -p $(TESTROOT)
$(Q)$(TOUCH) $@
.PHONY: test-clean
test-clean:
$(VQ)echo " CLEAN: $(TESTROOT)"
- $(VQ)echo " CLEAN: build-$(HOST)-coverage"
- $(Q)$(RM) -r $(TESTROOT) build-$(HOST)-coverage
+ $(VQ)echo " CLEAN: $(COV_ROOT)"
+ $(Q)$(RM) -r $(TESTROOT) $(COV_ROOT)
CLEANS += test-clean