Files
Opis/.github/scripts/test-no-error-reports.sh
bombcar 902d31c303 BY-NC-SA 4.0 (#5)
* BY-NC-SA 4.0

* BY-NC-SA 4.0

* update buildscripts
2022-02-15 18:04:15 +01:00

34 lines
693 B
Bash
Executable File

#!/usr/bin/env bash
RUNDIR="run"
CRASH="crash-reports"
SERVERLOG="server.log"
if [[ -d $RUNDIR/$CRASH ]]; then
echo "Crash reports detected:"
cat $RUNDIR/$CRASH/crash*.txt
exit 1
fi
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" $SERVERLOG; then
echo "Server force stopped:"
cat server.log
exit 1
fi
if ! grep --quiet -Po '.+Done \(.+\)\! For help, type "help" or "\?"' $SERVERLOG; then
echo "Server didn't finish startup:"
cat server.log
exit 1
fi
echo "No crash reports detected"
exit 0