-
Notifications
You must be signed in to change notification settings - Fork 13
buildserver
Currently the git plugin is broken for private git repositories, we'll have to wait for the next release (the bug is already fixed in the github repo of the plugin).
In the meantime, the following is the first build step:
# TODO: wait for next version of the git plugin, right new we have to do this manually:
rm -rf pbil
git clone --recursive https://r4d2:[email protected]/AluruLab/pbil.git pbilInstall the plugin Hudson CMake plugin.
Configure it for:
-
Source Directory:
pbil -
Build Directory:
build -
Install Directory:
install
Next step in the process is to call CTest:
# Run tests
cd build
# remove the Testing folder, otherwise the test results will ALL be parsed
# (including old ones)
rm -rf Testing/
ctest -T Test || true # test but ignore the result
cd ..For test coverage, the cmake needs to be build with ENABLE_COVERAGE, which currently is still auto-enabled, but shouldn't remain so.
The code coverage is determined with the program gcov. We use the wrapper gcovr. This has to be downloaded and installed somewhere into the $PATH where Jenkins can reach it. This can be done by copying the scripts/gcovr file into /usr/local/bin.
The next build step is then:
# run gcovr
cd build
# call gcovr with:
# -r <source folder>
# --object-directory <build/src>
# -e <pattern> // to exclude all test folders
gcovr -x -r $WORKSPACE/pbil/src --object-directory= $WORKSPACE/build/src -e ".*/test/.*"> Testing/coverage.xmlAfter the build procedure the testing and coverage reports have to be published.
To publish the GTest report (this needs the xUnit plugin): Publish xUnit Test Report -> Google Test, and add the following pattern:
build/Testing/gtest/*.xml
For the CTest report: Publish jUnit Test Report and add the pattern:
build/Testing/20*/Test.xml
For the coverage report, the plugin Cobertura is needen. Then publish a Cobertura report with pattern:
**/Testing/coverage.xml