Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tell Devel::Cover to ignore files outside current build directory #30

Open
zmughal opened this issue Dec 10, 2021 · 4 comments
Open

Tell Devel::Cover to ignore files outside current build directory #30

zmughal opened this issue Dec 10, 2021 · 4 comments
Assignees
Labels

Comments

@zmughal
Copy link
Member

zmughal commented Dec 10, 2021

This issue comes up in the coverage results of Test-PDL:

-pdl-commits:#pdl- [Test-PDL] [build/push]: ∀S ✓ a8ba9e2 | Zaki Mughal [sivoais] | Use shared GitHub Actions from PDLPorters (#6)
https://github.com/ebaudrez/Test-PDL/actions/runs/1557475038
[@sivoais] one odd thing with the coverage above: it thinks that a file from the PDL distribution is part of the coverage
[@sivoais] a file that is located in ~/.cpanm ??
[@sivoais] i saw this locally as well, but didn't bother tracking it down in Devel::Cover
[@sivoais] so even though Test-PDL's coverage is really 100%, it comes out at 76% on Coveralls

Coveralls link is: https://coveralls.io/jobs/91303010.

This is possibly just a matter of adding a -ignore_re option to the cover
command, but will need to be tested.

$ $TEST_RUNNER_PREFIX $MYPERL -S cover -test -relative_only -gcov_chdir -report Coveralls
   ----------------------------------- ------ ------ ------ ------ ------ ------
  File                                  stmt   bran   cond    sub   time  total
  ----------------------------------- ------ ------ ------ ------ ------ ------
  ...PDL-2.063/Basic/Core/Types.pm.PL   34.1   19.2   20.0   33.3   43.0   31.0
  blib/lib/Test/Deep/PDL.pm            100.0   75.0    n/a  100.0    5.3   97.7
  blib/lib/Test/PDL.pm                 100.0  100.0  100.0  100.0   51.6  100.0
  Total                                 73.3   69.4   81.8   58.2  100.0   70.3
  ----------------------------------- ------ ------ ------ ------ ------ ------
@zmughal zmughal added the bug label Dec 10, 2021
@zmughal zmughal self-assigned this Dec 10, 2021
@zmughal
Copy link
Member Author

zmughal commented Dec 31, 2021

@mohawk2 , does this have anything to do with the -relative_only flag that you created in your mohawk2:deepdirs PR for Devel::Cover?

@mohawk2
Copy link
Member

mohawk2 commented Dec 31, 2021

No, that's only to add a -r flag for gcov, which is in C-land. I think the above distro is pure-Perl.

@mohawk2
Copy link
Member

mohawk2 commented Feb 21, 2022

I think this means we need another patch to D:C?

@zmughal
Copy link
Member Author

zmughal commented Mar 7, 2022

I believe so, but my fix is not ready to go yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants