From f712b94ded52d695ee5f366dd4b62c06751e4334 Mon Sep 17 00:00:00 2001 From: Andreas Braun Date: Fri, 12 Feb 2021 11:46:51 +0100 Subject: [PATCH] Write test results to junit log file --- .evergreen/config.yml | 6 ++++-- .evergreen/run-tests.sh | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 9b2704017..8566ea608 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -324,9 +324,11 @@ functions: display_name: "drivers-dir.tar.gz" "upload test results": - - command: attach.results + - command: attach.xunit_results params: - file_location: "${PROJECT_DIRECTORY}/test-results.json" + # Uploading test results does not work when using ${PROJECT_DIRECTORY}, + # so we use an absolute path to work around this + file: "src/test-results.xml" - command: attach.results params: file_location: "${DRIVERS_TOOLS}/results.json" diff --git a/.evergreen/run-tests.sh b/.evergreen/run-tests.sh index f40b9a7f3..8e618bffe 100755 --- a/.evergreen/run-tests.sh +++ b/.evergreen/run-tests.sh @@ -23,10 +23,10 @@ fi echo "Running $AUTH tests, connecting to $MONGODB_URI" -# Run the tests, and store the results in a Evergreen compatible JSON results file +# Run the tests, and store the results in a junit result file case "$OS" in *) - TEST_PHP_ARGS="-q -x --show-diff -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP" make test TESTS=$TESTS + TEST_PHP_JUNIT="${PROJECT_DIRECTORY}/test-results.xml" TEST_PHP_ARGS="-q -x --show-diff -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP" make test TESTS=$TESTS ;; esac