Testing MySQL Router requires the appropriate flags during the compilation step. While Google Mock and Google Test are bundled to execute the tests, your system requires GCOV installed to optionally execute the code coverage tests. Change the paths and commands according to your needs.
shell>cd ~/srcshell>tar xfvz mysqlfabric-2.0.3.tar.gzshell>cd 2.0.3shell>mkdir buildtestsshell>cd buildtestsshell>cmake .. -DENABLE_GCOV=yes -DENABLE_TESTS=yesshell>make
Now, execute the unit tests:
shell> make test
Optionally, also execute a code coverage report.
This requires GCOV
shell>sh ../tests/gcoverage.sh -o /path/to/html/reportshell>firefox /path/to/html/report/index.html