-
Get tools and dependencies.
- CMake
- Eigen2 http://eigen.tuxfamily.org/
(or just "
sudo apt-get install libeigen2-dev
") - Google Testing Framework
- ...maybe others (work in progress)
-
Configure and build.
mkdir build cd build cmake .. make
-
Test.
./tests/testTAO ./tests/testMiniTAO
You need lcov
from http://ltp.sourceforge.net/coverage/lcov.php
(something like "sudo apt-get install lcov
" should do the trick).
-
Compile fresh binaries with gcov support.
cd /path/to/minitao mkdir build cd build cmake -DCOVERAGE=true .. make
-
Reset the
lcov
counters.cd /path/to/minitao lcov --directory build --zerocounters
-
Run the unit tests (and other things that exercise those parts of the code that you actually need).
cd /path/to/minitao/build ./tests/testTAO ./tests/testMiniTAO
-
Let loose
lcov
andgenhtml
(the latter comes withlcov
).cd /path/to/minitao lcov --directory build --capture --output-file cov.info genhtml cov.info -o cov/
-
Browse results: open cov/index.html in your favorite browser.