summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.inc6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/Makefile.inc b/tests/Makefile.inc
index f84fa30d52..2da29c3768 100644
--- a/tests/Makefile.inc
+++ b/tests/Makefile.inc
@@ -135,7 +135,13 @@ $(TEST_KCONFIG_AUTOCONFIG): $(TEST_KCONFIG_AUTOHEADER)
.PHONY: $(alltests) $(addprefix clean-,$(alltests))
.PHONY: unit-tests build-unit-tests run-unit-tests clean-unit-tests
+ifeq ($(JUNIT_OUTPUT),y)
+$(alltests): export CMOCKA_MESSAGE_OUTPUT=xml
+$(alltests): export CMOCKA_XML_FILE=$(testobj)/junit-$(subst /,_,$^).xml
+endif
+
$(alltests): $$($$(@)-bin)
+ rm -f $(testobj)/junit-$(subst /,_,$^).xml
./$^
unit-tests: build-unit-tests run-unit-tests