kennytm / cargo-kcov

Cargo subcommand to run kcov to get coverage report on Linux
127 stars 20 forks source link

Wrong kcov parameters on macos #52

Open paluchs-iohk opened 1 year ago

paluchs-iohk commented 1 year ago

There's an issue when running cargo-kcov on macos.

cargo kcov -v   
    Clean [..]
    Build test executables
    Coverage found the following executables: ["..."]
    Running "kcov" "--exclude-pattern=/Users/user/.cargo" "--exclude-pattern=/Users/travis/build/rust-lang/rust/" [...]```
And execution takes forever on a very small project since the libraries are instrumented.

kcov help page states:

--exclude-pattern=pat   comma-separated path patterns to exclude from the coverage report

so, it looks like param values should be comma separated, probably the second values overrides the first one.

And: https://github.com/kennytm/cargo-kcov/blob/master/src/main.rs

                     // Exclude the standard library symbols, otherwise kcov will take forever to run.
                    "--exclude-pattern=/Users/travis/build/rust-lang/rust/" 

does not seem to work on macos if you don't have Travis installed.