-
Notifications
You must be signed in to change notification settings - Fork 1
Code Coverage
Code coverage is a measurement of how comphrehensive your test suite is. It measures the percentage of lines that your tests execute during a run.
Online: Visit this link: https://codecov.io/github/Hyp-ed/hyped-2022/. Code cov provides a cloud hosted coverage analysis; this is updated during the Travis CI PR execution.
Locally:
- Create an empty build directory, e.g. by deleting
build
and recreating it. - Enter it and configure CMake with the coverage flag:
$ cmake -DCOVERAGE=ON ..
- Now run
make coverage
.
This will produce a html document in the build/test/coverage/html
directory. Open this to see a similar report to that of Code Cov.
For more information, read Build system.
Run git clone https://github.com/linux-test-project/lcov.git
to clone the lcov git repo. (Be careful not to accidentally run this inside the Hyped repo., remove the lcov directory if you did)
Run cd lcov
then make install
on osx or sudo make install
on Linux.
Return to the HYPED repo. and run make coverage
.
You may get errors about Perl modules missing, which would have to be installed. The errors look like these: Can't locate PerlIO/gzip.pm
or Can't locate JSON.pm
.
For Mac osx users, run brew install cpanm
to install cpanminus only once, followed by sudo cpanm <module name>
one time for each module.
For Linux, Debian users run sudo apt-get install <apt package name>
(and the equivalent for non-Debian). Alternatively, install cpanminus and proceed similar to the above.
In general, if the missing module is (Module)/(Name).pm, the module name for cpanm would be Module::Name while the apt package name would be lib(Module)-(Name)-perl. i.e. for the error above, OS X would run brew install cpanm
followed by sudo cpanm PerlIO::gzip
and sudo cpanm JSON
. For Linux Debian users, run sudo apt-get install libperlio-gzip-perl
and sudo apt-get install libjson-perl
.
For Windows users, please consult the CPAN Website for your options.
- Home
- How to add and edit pages on the wiki
- Glossary
- Admin
- Projects & Subsystems
- Motor Controllers
- Navigation
- Quality Assurance
- Sensors
- State Machine
- Telemetry
- Technical Guides
- BeagleBone Black (BBB)
- Configuration
- Contributing
- Testing
- Install VM on Mac
- Makefiles
- Reinstall MacOS Mojave
- Travis Troubleshooting
- Knowledge Base