From f795717040805bea5e5991b737df007804dc90cb Mon Sep 17 00:00:00 2001 From: Dmytro <13066272+TheElan@users.noreply.github.com> Date: Mon, 13 Dec 2021 15:34:41 +0200 Subject: [PATCH] add more checks for server not working --- .github/scripts/test-no-crash-reports.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/scripts/test-no-crash-reports.sh b/.github/scripts/test-no-crash-reports.sh index c67e342..73fa6ca 100755 --- a/.github/scripts/test-no-crash-reports.sh +++ b/.github/scripts/test-no-crash-reports.sh @@ -1,9 +1,22 @@ directory="run/crash-reports" -if [ -d $directory ]; then +if [[ -d $directory ]]; then echo "Crash reports detected:" cat $directory/* exit 1 -else - echo "No crash reports detected" - exit 0 fi + +if [[ grep --quiet "Fatal errors were detected" server.log ]]; 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 + echo "Server force stopped:" + cat server.log + exit 1 +fi + +echo "No crash reports detected" +exit 0 +