| 2 | |
| 3 | = Installation |
| 4 | |
| 5 | == Basic installation |
| 6 | |
| 7 | * The current testing system was installed using the Jenkins repository for debian: http://pkg.jenkins-ci.org/debian/ |
| 8 | |
| 9 | == Additional plugins |
| 10 | |
| 11 | * xUnit plugin for unit tests |
| 12 | |
| 13 | |
| 14 | == Unit test configuration |
| 15 | You can configure Jenkins to run our unit tests and report the results on the web interface. |
| 16 | The test executable can be configured and built to produce an xUnit compliant xml file with the test results. |
| 17 | |
| 18 | 1. Install the xUnit plugin |
| 19 | 1. In the project configuration, make sure to pass the argument --jenkins-tests to update-workspaces.sh |
| 20 | 1. 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. |
| 21 | |
| 22 | {{{ |
| 23 | #!/bin/bash |
| 24 | cd 0ad/binaries/system |
| 25 | echo "releasetype: $releasetype" |
| 26 | if [ "$releasetype" == "debug" ]; then |
| 27 | ./test_dbg > ../../../cxxtest_result_$releasetype.xml |
| 28 | else |
| 29 | -/test > ../../../cxxtest_result_$releasetype.xml |
| 30 | fi |
| 31 | sed -i 's/date/timestamp/g' ../../../cxxtest_result_$releasetype.xml |
| 32 | }}} |
| 33 | |
| 34 | 4. Add a post-build action to "Publish xUnit test report". |