Skip to content

Commit

Permalink
Add details on how to view coverage locally
Browse files Browse the repository at this point in the history
Unfortunately for now, Coveralls reports don't include source due
to #84, but this is a good workaround.
  • Loading branch information
aspiers committed Apr 7, 2024
1 parent cbc12d7 commit 49aa345
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ recommended to put them in a subdirectory called `playground/` since
this will be automatically ignored by git and the build process,
avoiding any undesirable complications.
Test coverage
~~~~~~~~~~~~~

To view test coverage reports, first ensure that
[`Devel::Cover`](https://metacpan.org/dist/Devel-Cover) is installed.
Then type `make coverage`. The last lines of the output should
include something like:

HTML output written to /home/user/path/to/stow/cover_db/coverage.html

which you can open in a web browser to view the report.

Translating Stow
----------------

Expand Down
4 changes: 4 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ check-TESTS:
dir=$(TESTS_DIR); \
$(TESTS_ENVIRONMENT) -MTest::Harness -e 'runtests(@ARGV)' "$${dir#./}"/*.t

coverage:
PERL5OPT=-MDevel::Cover $(MAKE) check-TESTS
cover

$(TESTS_OUT):
mkdir -p $@

Expand Down

0 comments on commit 49aa345

Please sign in to comment.