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
Add option to change threshold in HTML #261
Comments
That's a great suggestion! If you'd like to, you could try implementing this yourself:
How do you think should the command line options be named? I'd suggest |
I can try to do it.
Because the variables in the code are medium_coverage and high_coverage I would suggest --html-medium-coverage and --html-high-coverage the type should be percentage (like --fail-under-line).
What should be done if the values are set to the same value? I would suggest to change the legend in the HTML. If medium is lower than high this should result in a error.
regards Michael
|
I'll trust you to pick a sensible design, as long as you can explain why it is sensible.
Umm, I assume you meant this the other way around, so that Excluding impossible levels from the legend is a good idea, This should be simple as you'll only need to change a few lines in the root_page template (they use Jinja2 syntax). However, the template should continue to produce identical output for the existing tests so that we don't have to update all the HTML reference files. |
You are right, |
The tests are a bit flaky on Windows but should work, and we run (nearly) the complete test suite on Windows using AppVeyor. The exact test environment is described in the For debugging, it might be helpful to see the full output of the build process, e.g. from running this command in Bash: LANG=C python3 -m pytest --verbose --capture no -k 'shared_lib and txt' Unfortunately, I'm not deeply familiar with Windows and MinGW. As a random guess, the PATH variable might be wrong by mixing txt:
ifeq ($(BASE_OS),MSYS_NT)
- PATH="`pwd`/lib:${PATH}" testApp/test/a.out
+ PATH="`pwd`/lib;${PATH}" testApp/test/a.out
else
LD_LIBRARY_PATH=`pwd`/lib testApp/test/a.out
endif
$(GCOVR) -d -o coverage.txt If the tests don't work locally, that's not a huge problem: you can fork this repository on GitHub, then sign up for Travis CI or AppVeyor so that they run the tests whenever you push to your fork. The AppVeyor tests tend to give results faster. |
With another version of MSYS and GCC the tests are running except
and also a testcases for each option. Do I need a fork for a pull request? |
Thank you for your work! Yes, a pull request through GitHub would be easiest. You can click on the fork button, then add your GitHub fork as a remote repository in your local git repository. The repository URL is visible in the "clone or download" button on GitHub, and differs depending on whether you want to use HTTPS+passwords or SSH keys for authentication. For example: # rename the main gcovr repository from "origin" to "upstream"
git remote rename origin upstream
# add your fork as "origin"
git remote add origin https://github.com/Spacetown/gcovr.git After you Regarding cmake, our AppVeyor tests define the environment variable |
The cmake_oos test did not run on my machine even when changing the cmake call directly in the test. |
New pull request #264 |
It would be helpful if the thresholds for medium_coverage and high_coverage could be changed in the command line.
Thanks.
The text was updated successfully, but these errors were encountered: