From acf3c244c114511d9ad4f35703fed0a37f56a03c Mon Sep 17 00:00:00 2001 From: James Molet Date: Thu, 15 Aug 2024 14:50:38 -0400 Subject: [PATCH] feat: Saving test report as junit file --- systemtest/tests/integration/test.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/systemtest/tests/integration/test.sh b/systemtest/tests/integration/test.sh index 62a1f97..6f57da6 100755 --- a/systemtest/tests/integration/test.sh +++ b/systemtest/tests/integration/test.sh @@ -1,6 +1,5 @@ #!/bin/bash -set -eu -set -x +set -ux # get to project root cd ../../../ @@ -18,4 +17,11 @@ python3 -m venv venv pip install -r integration-tests/requirements.txt -pytest -v integration-tests +pytest --junit-xml=./junit.xml -v integration-tests +retval=$? + +if [ -d "$TMT_PLAN_DATA" ]; then + cp ./junit.xml "$TMT_PLAN_DATA/junit.xml" +fi + +exit $retval \ No newline at end of file