Skip to content

Commit 49aa345

Browse files
committed
Add details on how to view coverage locally
Unfortunately for now, Coveralls reports don't include source due to #84, but this is a good workaround.
1 parent cbc12d7 commit 49aa345

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

CONTRIBUTING.md

+12
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ recommended to put them in a subdirectory called `playground/` since
9090
this will be automatically ignored by git and the build process,
9191
avoiding any undesirable complications.
9292
93+
Test coverage
94+
~~~~~~~~~~~~~
95+
96+
To view test coverage reports, first ensure that
97+
[`Devel::Cover`](https://metacpan.org/dist/Devel-Cover) is installed.
98+
Then type `make coverage`. The last lines of the output should
99+
include something like:
100+
101+
HTML output written to /home/user/path/to/stow/cover_db/coverage.html
102+
103+
which you can open in a web browser to view the report.
104+
93105
Translating Stow
94106
----------------
95107

Makefile.am

+4
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ check-TESTS:
8787
dir=$(TESTS_DIR); \
8888
$(TESTS_ENVIRONMENT) -MTest::Harness -e 'runtests(@ARGV)' "$${dir#./}"/*.t
8989

90+
coverage:
91+
PERL5OPT=-MDevel::Cover $(MAKE) check-TESTS
92+
cover
93+
9094
$(TESTS_OUT):
9195
mkdir -p $@
9296

0 commit comments

Comments
 (0)