forked from albfan/miraclecast
-
Notifications
You must be signed in to change notification settings - Fork 1
Testing and Code Coverage
AtesComp edited this page May 30, 2022
·
2 revisions
Testing is a basic feature to asure code behave as expected. Miraclecast lacks most of it, but there's already some test
How much code is covered by test? Code coverage can answer that
-
You need to modify compilation to include coverage traces:
$ ./autogen.sh g --enable-gcov -
Then you can compile and execute test $ make $ make check
-
To generate code coverage:
$ make lcov $ xdg-open miracle-lcov/index.html
Is that all the code covered? Well, not really. All executables are compiled to support code coverage, so if you run any of them: miracle-wifid, miracle-sinkctl, miracle-dhcp, etc you will get more code coverage. That part needs to be automated and code coverage will increase, but a refactor needs to be done to isolate functionality and CLI.