From 48277b1691178d001a1f4f200a46d8551db265c8 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Tue, 21 May 2024 21:48:06 +0100 Subject: [PATCH] run_jenkins_tests: Put test results in the expected location Now that we clone to a subdirectory the relative path is wrong. --- tests/run_jenkins_tests.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/run_jenkins_tests.sh b/tests/run_jenkins_tests.sh index f4179eaca..fdf496300 100755 --- a/tests/run_jenkins_tests.sh +++ b/tests/run_jenkins_tests.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +set -e +set -x + case $1 in baseline|latest|ubuntu-baseline|ubuntu-latest) test_prefix=$1 @@ -10,8 +13,7 @@ case $1 in ;; esac -set -e -set -x +test_results="$PWD/$test_prefix-results.xml" if [ "${HOME:-/}" = "/" ]; then export HOME="$PWD/home" @@ -41,9 +43,9 @@ fi pytest_binary="python3 -m pytest" # Run unit tests -rm -f "../$test_prefix-results.xml" +rm -f "$test_results" $pytest_binary -v --junit-xml "../$test_prefix-results.xml" tests || echo "Some tests failed" -if [ ! -e "../$test_prefix-results.xml" ]; then +if [ ! -e "$test_results" ]; then echo "FATAL: could not find test results xml" exit 1 fi