ci: ensure XML test reports do not clobber the output of previous runs
Change-Id: I5ad31d571d296b6cd85012786ab3d4370f98fbea
Refs: #3750
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index 216e89f..fe7981d 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -12,13 +12,12 @@
BOOST_VERSION=$(python -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
ut_log_args() {
- ((ut_count+=1))
if (( BOOST_VERSION >= 106200 )); then
- echo --logger=HRF,test_suite,stdout:XML,all,build/xunit-report-${ut_count}.xml
+ echo --logger=HRF,test_suite,stdout:XML,all,build/xunit-${1:-report}.xml
else
if [[ -n $XUNIT ]]; then
echo --log_level=all $( (( BOOST_VERSION >= 106000 )) && echo -- ) \
- --log_format2=XML --log_sink2=build/xunit-report-${ut_count}.xml
+ --log_format2=XML --log_sink2=build/xunit-${1:-report}.xml
else
echo --log_level=test_suite
fi
@@ -38,5 +37,3 @@
# Run unit tests
./build/unit-tests $(ut_log_args)
-
-unset ut_count