diff options
Diffstat (limited to '.github/scripts')
-rwxr-xr-x[-rw-r--r--] | .github/scripts/test-no-error-reports.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/.github/scripts/test-no-error-reports.sh b/.github/scripts/test-no-error-reports.sh index e3876606d5..84c1e5d650 100644..100755 --- a/.github/scripts/test-no-error-reports.sh +++ b/.github/scripts/test-no-error-reports.sh @@ -1,22 +1,28 @@ -if [[ -d "run/crash-reports" ]]; then +#!/usr/bin/env bash + +RUNDIR="run" +CRASH="crash-reports" +SERVERLOG="server.log" + +if [[ -d $RUNDIR/$CRASH ]]; then echo "Crash reports detected:" - cat $directory/* + cat $RUNDIR/$CRASH/crash*.txt exit 1 fi -if grep --quiet "Fatal errors were detected" server.log; then +if grep --quiet "Fatal errors were detected" $SERVERLOG; then echo "Fatal errors detected:" cat server.log exit 1 fi -if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" server.log; then +if grep --quiet "The state engine was in incorrect state ERRORED and forced into state SERVER_STOPPED" $SERVERLOG; then echo "Server force stopped:" cat server.log exit 1 fi -if grep --quiet 'Done .+ For help, type "help" or "?"' server.log; then +if ! grep --quiet -Po '.+Done \(.+\)\! For help, type "help" or "\?"' $SERVERLOG; then echo "Server didn't finish startup:" cat server.log exit 1 |