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

Test coverage is not accurate #43

Open
mssun opened this issue Aug 2, 2018 · 6 comments
Open

Test coverage is not accurate #43

mssun opened this issue Aug 2, 2018 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@mssun
Copy link
Contributor

mssun commented Aug 2, 2018

Everything works well except for files/functions under shell. I don't why the integration test cases for shell will not emit hit counts. Therefore, the test coverage for posix/sh is not accurate.

@mssun mssun added the help wanted Extra attention is needed label Aug 2, 2018
@Arcterus
Copy link
Contributor

Arcterus commented Aug 2, 2018

Can you test the coverage on the sh-parser branch? It no longer uses nom so I'm curious if that helped at all.

@mssun
Copy link
Contributor Author

mssun commented Aug 2, 2018

@Arcterus
Copy link
Contributor

Arcterus commented Aug 2, 2018

Not sure what the problem is then :/

@mssun
Copy link
Contributor Author

mssun commented Aug 2, 2018

I found that the libmesabox test (unit tests) reported coverage statistics of parser.rs (though zero coverage because of no unit tests for parser I guess). However, if we only look at the integration tests, here is no report of parser.rs for the integration tests. This is wired. This implies that all symbols of parser.rs are missing and the file is also not included in the report.

@mssun
Copy link
Contributor Author

mssun commented Aug 4, 2018

Another case is that the parser_num function is explicitly called by tests, but the coverage results show it was not hit. https://codecov.io/gh/mesalock-linux/mesabox/src/master/libmesabox/src/posix/head.rs#L339

@mssun
Copy link
Contributor Author

mssun commented Aug 6, 2018

With further investigation, I found that functions in validator_os in clap will not be counted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants