From fccf75da391b579200a26182de90220f2b65ff69 Mon Sep 17 00:00:00 2001 From: bombcar Date: Sat, 12 Feb 2022 09:08:56 -0600 Subject: [PATCH] update erorr script --- .github/scripts/test-no-error-reports.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/scripts/test-no-error-reports.sh b/.github/scripts/test-no-error-reports.sh index e387660..22928fc 100644 --- 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 -v '.+Done \(.+\)\! For help, type "help" or "\?"' $SERVERLOG; then echo "Server didn't finish startup:" cat server.log exit 1