-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
bash: Show uncovered files in report #224
Comments
Unfortunately, it's very difficult to actually know what scripts will be
sourced by a bash script, so it's not currently possible.
One way of doing something like it would be to add an option to scan a
directory for files and add them to the list of executable files. I'm not
sure if that would fit your particular case though?
I.e., something like
```
kcov --add-source-files=dir [...] your-program
```
|
Hi Simon, Thanks for the feedback. Something like your suggestion would be ideal if it were possible. I previously looked at another option for bash coverage... https://github.com/infertux/bashcov This does actually instrument all of the bash scripts in the project folder. Hence I started using kcov which works very well but it would be handy if it were able to show gaps in my test suite. Thanks |
I'll take a look to see how this could be implemented, hopefully during the next few days. |
By default kcov scans the binary directory for bash scripts.
Fixed with 0dd22bd . Kcov now by default parses the directory of the script to find other scripts. This behavior can be turned off via an option, and another option allows passing directories manually as we discussed above. So I think your test case should work by default now. |
Great. Thanks! |
@SimonKagstrom has this option been removed? |
No, should still be there. Has it been broken?
|
unfortunately |
I just tested it here, and it works for me. I.e., with a
where
what are the circumstances when it doesn't work? |
adding |
Hi,
I'm using kcov to report code coverage on a project that is mainly made up of bash scripts.
We are building out the unit test suite retrospectively.
Is it possible to include uncovered scripts in the html report?
Ideally I would like to be able to see what scripts have not yet been covered by tests and also identify any new scripts that may get added without an accompanying unit test.
The text was updated successfully, but these errors were encountered: