From 5a8c7f947dd195a74f9751dd61081e6b1ecb5541 Mon Sep 17 00:00:00 2001 From: Niklas Wahl Date: Sat, 4 Feb 2023 15:48:06 +0100 Subject: [PATCH] Revert "adjust xvfb call in testing" This reverts commit 075402c8dea5ecf9c31f2f53cc35209ccc28fbbd. (cherry picked from commit 78c7b3daae3534525c376d3ff8637ea4020fa3da) --- .github/runtests.sh | 10 +++++++--- .github/workflows/tests.yml | 3 +-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/runtests.sh b/.github/runtests.sh index 976fe6cb8..33afcc80f 100644 --- a/.github/runtests.sh +++ b/.github/runtests.sh @@ -7,8 +7,6 @@ function exitIfError { # currently octave 6 can finish with a segfault when the program is closed due to some bug, for now we try to ignore it if [ "$1" -ne 0 ] && [ "$1" -ne 139 ]; then exit $1; - else - exit 0; fi } @@ -41,5 +39,11 @@ export CONTINUOUS_INTEGRATION=true export CI=true ## Actually run the test suite -${Runner} ${Switches} "matRad_runTests" > ../runtests.log #2> ../runtests.err put stdout to log, but let it print error messages +cd unitTest +TESTDIR=`pwd` +# also CD in MATLAB/Octave to make sure that startup files +# cannot play any role in setting the path +${Runner} ${Switches} "cd('${TESTDIR}'); matRad_runTests" > ../runtests.log #2> ../runtests.err put stdout to log, but let it print error messages exitIfError $? +cd .. + diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b4381e661..d41c5746d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,11 +29,10 @@ jobs: uses: GabrielBB/xvfb-action@v1 #For Headless tests with: run: .github/runtests.sh octave-cli - working-directory: ./unitTest - name: Upload logs if test fails uses: actions/upload-artifact@v3 if: failure() with: name: Test Log - path: ./unitTest/runtests.log + path: runtests.log