File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.build
22.hardware
3+ test_report.xml
4+ test_report.html
Original file line number Diff line number Diff line change 3131endif
3232
3333
34- all : count tests
34+ all : count tests test_report
3535
3636count :
3737 @echo Running $(words $(TEST_LIST ) ) tests
@@ -75,6 +75,15 @@ ifneq ("$(NO_RUN)","1")
7575 `test -f $(addsuffix .py, $(basename $@)) && echo "-m $(addsuffix .py, $(basename $@))" || echo ""`
7676endif
7777
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+
7887$(BUILD_DIR ) :
7988 mkdir -p $(BUILD_DIR )
8089
@@ -88,6 +97,7 @@ virtualenv:
8897clean :
8998 rm -rf $(BUILD_DIR )
9099 rm -rf $(HARDWARE_DIR )
100+ rm -f $(TEST_REPORT_HTML ) $(TEST_REPORT_XML )
91101
92102$(TEST_CONFIG ) :
93103 @echo " ****** "
@@ -96,4 +106,4 @@ $(TEST_CONFIG):
96106 @echo " ****** "
97107 false
98108
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