diff --git a/FreeRTOS/Test/CMock/Makefile b/FreeRTOS/Test/CMock/Makefile index b58f7987ac..aa4950a80a 100644 --- a/FreeRTOS/Test/CMock/Makefile +++ b/FreeRTOS/Test/CMock/Makefile @@ -14,7 +14,7 @@ execs: $(UNITS) | directories $(UNITS) : ${LIB_DIR}/libcmock.so ${LIB_DIR}/libunity.so | directories - $(MAKE) -C $@ + $(MAKE) -C $@ doc: | directories $(MAKE) -C doc all @@ -50,21 +50,24 @@ $(LIB_DIR)/libcmock.so : ${CMOCK_SRC_DIR}/cmock.c \ $(LIB_DIR)/libunity.so : ${UNITY_SRC_DIR}/unity.c \ ${UNITY_SRC_DIR}/unity.h \ Makefile | directories - ${CC} -o $@ -shared -fPIC $< + ${CC} -o $@ -shared -fPIC $< -run : $(UNITS) zero_coverage | directories - for f in $(BIN_DIR)/*; do \ - $${f}; done +run : $(UNITS) directories + -rm $(BUILD_DIR)/unit_test_report.txt + for f in $(BIN_DIR)/*; do \ + $${f} | tee -a $(BUILD_DIR)/unit_test_report.txt ; done + cd $(BUILD_DIR) && \ + ruby $(UNITY_BIN_DIR)/parse_output.rb -xml $(BUILD_DIR)/unit_test_report.txt run_col : $(UNITS) zero_coverage | directories for f in $(BIN_DIR)/*; do \ - ruby -r $(UNITY_BIN_DIR)/colour_reporter.rb -e "report('`$${f}`')"; done + ruby -r $(UNITY_BIN_DIR)/colour_reporter.rb -e "report('`$${f}`')"; done run_formatted : $(UNITS) zero_coverage | directories for f in $(BIN_DIR)/*; do \ $${f} > $(BUILD_DIR)/output; \ ruby $(UNITY_BIN_DIR)/parse_output.rb $(BUILD_DIR)/output ; \ - done + done run_col_formatted : $(UNITS) zero_coverage | directories for f in $(BIN_DIR)/*; do \ @@ -72,7 +75,7 @@ run_col_formatted : $(UNITS) zero_coverage | directories ruby -r $(UNITY_BIN_DIR)/colour_reporter.rb \ -e "report('$$(ruby $(UNITY_BIN_DIR)/parse_output.rb \ $(BUILD_DIR)/output)')"; \ - done + done zero_coverage : lcov --zerocounters --directory $(BUILD_DIR) @@ -82,3 +85,4 @@ coverage : run_col genhtml $(BUILD_DIR)/cmock_test.info --branch-coverage \ --output-directory $(COVERAGE_DIR) +