Skip to content

Commit

Permalink
Improve test run exit system
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaming32 committed May 15, 2024
1 parent 10860c2 commit ad882a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ jobs:
- name: Compile World Host
run: ./gradlew :${{ matrix.subproject }}:classes
- name: Run tests
run: |
xvfb-run -a -s "-screen 0 1920x1080x24" bash -c './gradlew :${{ matrix.subproject }}:runTestHost --stacktrace & ./gradlew :${{ matrix.subproject }}:runTestJoiner --stacktrace && fg'
run: xvfb-run -a -s "-screen 0 1920x1080x24" ./runTests.sh
10 changes: 10 additions & 0 deletions runTests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
./gradlew :$1:runTestHost --stacktrace &
$host_pid = $!
./gradlew :$1:runTestJoiner --stacktrace &
$joiner_pid = $!
wait $host_pid
$code = $?
if [ $host_pid -ne 0 ]; then
exit $code
fi
exit $(wait $joiner_pid)

0 comments on commit ad882a0

Please sign in to comment.