aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-12-06 16:11:30 +0100
committerLoïc Hoguin <[email protected]>2018-12-06 16:11:30 +0100
commit44fe1e993f16c98ed41c01e4511c0367e14e9637 (patch)
treeb893423a3e4b14917be1c2c49c848ad680177572
parent6b213a52bf48af590fd65dfd95d8fc949ac5f1e5 (diff)
downloaderlang.mk-44fe1e993f16c98ed41c01e4511c0367e14e9637.tar.gz
erlang.mk-44fe1e993f16c98ed41c01e4511c0367e14e9637.tar.bz2
erlang.mk-44fe1e993f16c98ed41c01e4511c0367e14e9637.zip
Default COVER_DATA_DIR now the same as COVER_REPORT_DIR
We have a dedicated folder for cover stuff, let's use it.
-rw-r--r--CHANGELOG.asciidoc3
-rw-r--r--plugins/cover.mk2
-rw-r--r--test/plugin_cover.mk24
3 files changed, 16 insertions, 13 deletions
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index ef5d2f2..27e48cd 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -7,3 +7,6 @@
information. A quick fix if this causes an
issue is to add `FULL = 1` at the top of your
Makefile.
+
+2018/12/06: Change the default COVER_DATA_DIR to be the
+ same as COVER_REPORT_DIR.
diff --git a/plugins/cover.mk b/plugins/cover.mk
index 60809a3..416219c 100644
--- a/plugins/cover.mk
+++ b/plugins/cover.mk
@@ -3,7 +3,7 @@
# This file is part of erlang.mk and subject to the terms of the ISC License.
COVER_REPORT_DIR ?= cover
-COVER_DATA_DIR ?= $(CURDIR)
+COVER_DATA_DIR ?= $(COVER_REPORT_DIR)
# Hook in coverage to ct
diff --git a/test/plugin_cover.mk b/test/plugin_cover.mk
index 61910dd..b6b3a5d 100644
--- a/test/plugin_cover.mk
+++ b/test/plugin_cover.mk
@@ -25,12 +25,12 @@ cover-ct: build clean
$t $(MAKE) -C $(APP) ct COVER=1 $v
$i "Check that the generated files exist"
- $t test -f $(APP)/ct.coverdata
+ $t test -f $(APP)/cover/ct.coverdata
$t test -f $(APP)/test/ct.cover.spec
$i "Check that the generated files are removed on clean"
$t $(MAKE) -C $(APP) clean $v
- $t test ! -e $(APP)/ct.coverdata
+ $t test ! -e $(APP)/cover/ct.coverdata
$t test ! -e $(APP)/test/ct.cover.spec
cover-custom-dir: build clean
@@ -108,11 +108,11 @@ cover-eunit: build clean
$t $(MAKE) -C $(APP) eunit COVER=1 $v
$i "Check that the generated file exists"
- $t test -f $(APP)/eunit.coverdata
+ $t test -f $(APP)/cover/eunit.coverdata
$i "Check that the generated file is removed on clean"
$t $(MAKE) -C $(APP) clean $v
- $t test ! -e $(APP)/eunit.coverdata
+ $t test ! -e $(APP)/cover/eunit.coverdata
cover-eunit-apps-only: build clean
@@ -136,10 +136,10 @@ cover-eunit-apps-only: build clean
$t $(MAKE) -C $(APP) eunit COVER=1 $v
$i "Check that no file was generated in the top-level directory"
- $t ! test -f $(APP)/eunit.coverdata
+ $t ! test -f $(APP)/cover/eunit.coverdata
$i "Check that the generated file exists"
- $t test -f $(APP)/apps/my_app/eunit.coverdata
+ $t test -f $(APP)/apps/my_app/cover/eunit.coverdata
cover-report-and-merge: build clean
@@ -170,19 +170,19 @@ cover-report-and-merge: build clean
$i "Check that the generated files exist"
$t test -f $(APP)/cover/$(APP).COVER.html
$t test -f $(APP)/cover/index.html
- $t test -f $(APP)/ct.coverdata
- $t test -f $(APP)/eunit.coverdata
+ $t test -f $(APP)/cover/ct.coverdata
+ $t test -f $(APP)/cover/eunit.coverdata
$t test -f $(APP)/test/ct.cover.spec
$i "Merge coverdata files into all.coverdata"
$t $(MAKE) -C $(APP) all.coverdata $v
- $t test -f $(APP)/all.coverdata
+ $t test -f $(APP)/cover/all.coverdata
$i "Check that the generated files are removed on clean"
$t $(MAKE) -C $(APP) clean $v
- $t test ! -e $(APP)/all.coverdata
- $t test ! -e $(APP)/ct.coverdata
- $t test ! -e $(APP)/eunit.coverdata
+ $t test ! -e $(APP)/cover/all.coverdata
+ $t test ! -e $(APP)/cover/ct.coverdata
+ $t test ! -e $(APP)/cover/eunit.coverdata
$t test ! -e $(APP)/test/ct.cover.spec
$i "Check that the cover report is removed on distclean"