diff options
Diffstat (limited to 'tools/test/test-setup.sh')
-rwxr-xr-x | tools/test/test-setup.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/test/test-setup.sh b/tools/test/test-setup.sh index 8ce2ea8dce..058c459cc1 100755 --- a/tools/test/test-setup.sh +++ b/tools/test/test-setup.sh @@ -179,6 +179,11 @@ if [ -n "${XML_OUTPUT_FILE-}" -a ! -f "${XML_OUTPUT_FILE-}" ]; then errors=0 error_msg= fi + # Ensure that test shards have unique names in the xml output. + if [[ -n "${TEST_TOTAL_SHARDS+x}" ]] && ((TEST_TOTAL_SHARDS != 0)); then + ((shard_num=TEST_SHARD_INDEX+1)) + TEST_NAME="$TEST_NAME"_shard_"$shard_num"/"$TEST_TOTAL_SHARDS" + fi cat <<EOF >${XML_OUTPUT_FILE} <?xml version="1.0" encoding="UTF-8"?> <testsuites> |