Skip to content

Commit f1bdaa4

Browse files
authored
Write test results to junit log file (#1200)
1 parent 500cc82 commit f1bdaa4

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.evergreen/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,11 @@ functions:
341341
display_name: "drivers-dir.tar.gz"
342342

343343
"upload test results":
344-
- command: attach.results
344+
- command: attach.xunit_results
345345
params:
346-
file_location: "${PROJECT_DIRECTORY}/test-results.json"
346+
# Uploading test results does not work when using ${PROJECT_DIRECTORY},
347+
# so we use an absolute path to work around this
348+
file: "src/test-results.xml"
347349
- command: attach.results
348350
params:
349351
file_location: "${DRIVERS_TOOLS}/results.json"

.evergreen/run-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ fi
2323

2424
echo "Running $AUTH tests, connecting to $MONGODB_URI"
2525

26-
# Run the tests, and store the results in a Evergreen compatible JSON results file
26+
# Run the tests, and store the results in a junit result file
2727
case "$OS" in
2828
*)
29-
TEST_PHP_ARGS="-q -x --show-diff -g FAIL,XFAIL,BORK,WARN,LEAK,SKIP" make test TESTS=$TESTS
29+
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
3030
;;
3131
esac
3232

0 commit comments

Comments
 (0)