Преглед на файлове

running all tests in the end to get a combined coverage report

stefan преди 9 месеца
родител
ревизия
a78091f623
променени са 1 файла, в които са добавени 14 реда и са изтрити 0 реда
  1. 14 0
      makefile

+ 14 - 0
makefile

@@ -14,6 +14,11 @@ INTEGRATIONTEST_C_OBJ_DIR := $(INTEGRATIONTEST_CPP_OBJ_DIR)
 INTEGRATIONTEST_AUTH_C_OBJ_DIR := $(INTEGRATIONTEST_AUTH_CPP_OBJ_DIR)
 UNITTEST_OBJ_DIR := $(OBJ_DIR)test/unittest/
 
+define \n
+
+
+endef
+
 CC  := gcc
 CPP := g++
 LN  := ln
@@ -108,6 +113,15 @@ help:
 	@echo -----------------------------------------------
 
 test: $(TEST_RUN_TARGETS)
+	- @mkdir -p output/test/report
+# run the test alltogether to get coverage from all combined tests
+#	remove coverage from former run
+	@-find . -name "*.gcda" -type f -delete
+	$(foreach TEST_RUN_TARGET,$(TEST_RUN_TARGETS),./$(OBJ_DIR)test/$(TEST_RUN_TARGET)/$(TEST_RUN_TARGET)${\n})
+
+#	remove report from former run
+	-rm -rf $(OBJ_DIR)test/report/*
+	gcovr --html-details --output $(OBJ_DIR)test/report/report.html -f src -f api -d
 
 cppcheck:
 	- @mkdir -p output/cppcheck/html