I"m having a problem while building my CMake based C++ project . The problem is with making a target that runs the
gcovr. I have no problem on my local machine but Travis CI build throws the following error at the end of making a target:
$ make coverage [ 30%] Built target Particle [ 46%] Built target gtest [ 61%] Built target gtest_main [ 76%] Built target TestSwarm [ 92%] Built target TestParticle Scanning dependencies of target coverage [100%] Running gcovr to produce HTML code coverage report. Test project /home/travis/build/MrPoudel/ParticleExplosion/build Start 1: TestParticle 1/2 Test #1: TestParticle ..................... Passed 0.00 sec Start 2: TestSwarm 2/2 Test #2: TestSwarm ........................ Passed 0.00 sec 100% tests passed, 0 tests failed out of 2 Total Test time (real) = 0.01 sec Usage: gcovr [options] gcovr: error: no such option: --html make: *** [test/CMakeFiles/coverage] Error 2 make: *** [test/CMakeFiles/coverage.dir/all] Error 2 make: *** [test/CMakeFiles/coverage.dir/rule] Error 2 make: *** [coverage] Error 2 The command "make coverage" exited with 2. 0.00s$ cd .. The command "cd .." exited with 0.
And I’m running the same version of
gcovr 2.4 on Travis CI build and on my local machine.
The detail error can be seen here: https://travis-ci.org/github/MrPoudel/ParticleExplosion/builds/720140138
Any suggestions would be appreciated.