Skip to content

Commit

Permalink
run_jenkins_tests: Put test results in the expected location
Browse files Browse the repository at this point in the history
Now that we clone to a subdirectory the relative path is wrong.
  • Loading branch information
jrtc27 committed May 21, 2024
1 parent e8223cf commit 48277b1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/run_jenkins_tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/usr/bin/env bash

set -e
set -x

case $1 in
baseline|latest|ubuntu-baseline|ubuntu-latest)
test_prefix=$1
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 48277b1

Please sign in to comment.