diff options
-rw-r--r-- | plugins/cover.mk | 4 | ||||
-rw-r--r-- | test/plugin_cover.mk | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/cover.mk b/plugins/cover.mk index b57458a..a14b992 100644 --- a/plugins/cover.mk +++ b/plugins/cover.mk @@ -80,7 +80,9 @@ ifneq ($(COVER_REPORT_DIR),) .PHONY: cover-report-clean cover-report cover-report-clean: - $(gen_verbose) rm -rf $(COVER_REPORT_DIR) $(COVER_DATA_DIR) + $(gen_verbose) rm -rf $(COVER_REPORT_DIR) + # Remove the COVER_DATA_DIR only if it is empty. + -$(verbose) rmdir $(COVER_DATA_DIR) ifeq ($(COVERDATA),) cover-report: diff --git a/test/plugin_cover.mk b/test/plugin_cover.mk index 905e6d2..c9ba3d7 100644 --- a/test/plugin_cover.mk +++ b/test/plugin_cover.mk @@ -84,6 +84,12 @@ cover-custom-dir: build clean $t $(MAKE) -C $(APP) distclean $v $t test ! -e $(APP)/custom_dir/ + $i "Check that the custom dir is not removed if not empty" + $t mkdir $(APP)/custom_dir + $t touch $(APP)/custom_dir/file + $t $(MAKE) -C $(APP) distclean $v + $t test -f $(APP)/custom_dir/file + cover-eunit: build clean $i "Bootstrap a new OTP application named $(APP)" |