SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
710 stars 109 forks source link

How to run kcov against a script run as sudo? #372

Closed davehouser1 closed 2 years ago

davehouser1 commented 2 years ago

I want to be able to run the following:

sudo kcov --clean --include-path=/home/jenkins /var/www/html/ sudo bats ./test_script.bats

However kcov only runs tests against sudo, which gives no results. how can I get kcov to look past sudo in the syntax of the executable to run?

More details found here in this post

davehouser1 commented 2 years ago

Nm, I just realized I was reading kcov output incorrectly. My command works fine without the sudo before bats. Closing.