Version 3 (modified by Yves, 10 years ago) ( diff )

--

This replaces the old and probably outdated work in progress documentation about Jenkins which can still be found here: JenkinsSetupOld.

Installation

Basic installation

Additional plugins

  • xUnit plugin for unit tests

Unit test configuration

You can configure Jenkins to run our unit tests and report the results on the web interface. The test executable can be configured and built to produce an xUnit compliant xml file with the test results.

  1. Install the xUnit plugin
  2. In the project configuration, make sure to pass the argument --jenkins-tests to update-workspaces.sh
  3. in the execute shell section, add the following script to run the tests. It also contains a small fix for an incompatibility with the xUnit format used by Jenkins.
#!/bin/bash
cd 0ad/binaries/system
echo "releasetype: $releasetype"
if [ "$releasetype" == "debug" ]; then
    ./test_dbg > ../../../cxxtest_result_$releasetype.xml
else
    -/test > ../../../cxxtest_result_$releasetype.xml
fi
sed -i 's/date/timestamp/g' ../../../cxxtest_result_$releasetype.xml
  1. Add a post-build action to "Publish xUnit test report".

No image "publish_xUnit_test_result_report.png" attached to JenkinsSetup

Note: See TracWiki for help on using the wiki.