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
709 stars 109 forks source link

configuration: refactorize code scanning for executables #416

Closed perillo closed 5 months ago

perillo commented 5 months ago

Add the look_path function for searching executable in directories named by the PATH environment variable in the utils source file.

Refactorize the parse function in configuration.cc, using the new look_path function. This greatly simplify the code.

This PR implements an idea discussed #415.

The new change should behave the same as the current implementation, but unfortunately I can not verify this, because many tests fails on my system, probably due to incorrectly building the test suite.

perillo commented 5 months ago

Is seems that this change is also incorrect: https://github.com/SimonKagstrom/kcov/actions/runs/8208545224.

I was sure that the behavior was the same as the original code.

SimonKagstrom commented 5 months ago

Let's merge this anyway, I'll resolve the test errors later. Thanks a lot!

perillo commented 5 months ago

Thanks to you.