Skip to content

Commit

Permalink
adjust xvfb call in testing
Browse files Browse the repository at this point in the history
  • Loading branch information
wahln committed Feb 4, 2023
1 parent ec4e8b2 commit 075402c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 3 additions & 7 deletions .github/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ 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
}

Expand Down Expand Up @@ -39,11 +41,5 @@ export CONTINUOUS_INTEGRATION=true
export CI=true

## Actually run the test suite
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
${Runner} ${Switches} "matRad_runTests" > ../runtests.log #2> ../runtests.err put stdout to log, but let it print error messages
exitIfError $?
cd ..

3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ 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: runtests.log
path: ./unitTest/runtests.log

0 comments on commit 075402c

Please sign in to comment.