File tree 2 files changed +14
-2
lines changed
2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1
1
.build
2
2
.hardware
3
+ test_report.xml
4
+ test_report.html
Original file line number Diff line number Diff line change 31
31
endif
32
32
33
33
34
- all : count tests
34
+ all : count tests test_report
35
35
36
36
count :
37
37
@echo Running $(words $(TEST_LIST ) ) tests
@@ -75,6 +75,15 @@ ifneq ("$(NO_RUN)","1")
75
75
`test -f $(addsuffix .py, $(basename $@)) && echo "-m $(addsuffix .py, $(basename $@))" || echo ""`
76
76
endif
77
77
78
+ $(TEST_REPORT_XML ) : $(HARDWARE_DIR ) virtualenv
79
+ @$(BS_DIR ) /virtualenv/bin/xunitmerge $(shell find $(BUILD_DIR ) -name 'test_result.xml' | xargs echo) $(TEST_REPORT_XML )
80
+
81
+ $(TEST_REPORT_HTML ) : $(TEST_REPORT_XML ) | virtualenv
82
+ @$(BS_DIR ) /virtualenv/bin/junit2html $< $@
83
+
84
+ test_report : $(TEST_REPORT_HTML )
85
+ @echo " Test report generated in $( TEST_REPORT_HTML) "
86
+
78
87
$(BUILD_DIR ) :
79
88
mkdir -p $(BUILD_DIR )
80
89
@@ -88,6 +97,7 @@ virtualenv:
88
97
clean :
89
98
rm -rf $(BUILD_DIR )
90
99
rm -rf $(HARDWARE_DIR )
100
+ rm -f $(TEST_REPORT_HTML ) $(TEST_REPORT_XML )
91
101
92
102
$(TEST_CONFIG ) :
93
103
@echo " ****** "
@@ -96,4 +106,4 @@ $(TEST_CONFIG):
96
106
@echo " ****** "
97
107
false
98
108
99
- .PHONY : tests all count venv $(BUILD_DIR ) $(TEST_LIST )
109
+ .PHONY : tests all count virtualenv test_report $(BUILD_DIR ) $(TEST_LIST )
You can’t perform that action at this time.
0 commit comments