diff options
| author | Edward Thomson <ethomson@edwardthomson.com> | 2018-09-10 14:59:20 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2018-10-26 13:53:43 +0200 |
| commit | 643b71851efbf13bb5e998fcec8bf060ae94150b (patch) | |
| tree | ea31353a9aefd88b2f161b9b52e27b2300753ea9 | |
| parent | a5a0c7699f64c6f8b1bad6fed094d63ffe3614cb (diff) | |
| download | libgit2-643b71851efbf13bb5e998fcec8bf060ae94150b.tar.gz | |
ci: write test result XML
Add the clar flags to produce JUnit-style XML output before invocation.
(cherry picked from commit fff33a1b65994e1f781f73d06e22d3f8778eff02)
| -rwxr-xr-x | ci/test.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ci/test.sh b/ci/test.sh index e162a4469..ff5e7a0ec 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -37,11 +37,14 @@ die() { exit $1 } -# Ask ctest what it would run if we were to invoke it directly. This lets us manage the -# test configuration in a single place (tests/CMakeLists.txt) instead of running clar -# here as well. But it allows us to wrap our test harness with a leak checker like valgrind. +# Ask ctest what it would run if we were to invoke it directly. This lets +# us manage the test configuration in a single place (tests/CMakeLists.txt) +# instead of running clar here as well. But it allows us to wrap our test +# harness with a leak checker like valgrind. Append the option to write +# JUnit-style XML files. run_test() { TEST_CMD=$(ctest -N -V -R "^${1}$" | sed -n 's/^[0-9]*: Test command: //p') + TEST_CMD="${TEST_CMD} -r${BUILD_DIR}/results_${1}.xml" if [ "$LEAK_CHECK" = "valgrind" ]; then RUNNER="$VALGRIND $TEST_CMD" |
