From 68fd0cf41d60fe6ef576a93d3b7b204cc07554c2 Mon Sep 17 00:00:00 2001 From: Wilhelm Schuster Date: Sun, 24 Nov 2024 20:29:19 +0100 Subject: [PATCH] Try to detect if the server test run didn't shut down cleanly (#42) Co-authored-by: Maya <10861407+serenibyss@users.noreply.github.com> --- .github/workflows/build-and-test.yml | 2 +- scripts/test_no_error_reports | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 42f3d1e..ead6774 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -108,7 +108,7 @@ jobs: PR_BRANCH: ${{ github.head_ref }} FIXED_BRANCH: ${{ github.head_ref }}-spotless-fixes - - name: Run server for ${{ inputs.timeout }} seconds + - name: Run server for up to ${{ inputs.timeout }} seconds if: ${{ !inputs.client-only }} run: | mkdir -p run diff --git a/scripts/test_no_error_reports b/scripts/test_no_error_reports index 1fcc739..dc57a2f 100755 --- a/scripts/test_no_error_reports +++ b/scripts/test_no_error_reports @@ -39,6 +39,14 @@ if grep --quiet --fixed-strings 'The state engine was in incorrect state ERRORED exit 1 fi +if grep --quiet --fixed-strings 'Exception stopping the server' "$SERVERLOG"; then + { + printf "Server didn't shut down cleanly:\n" + cat server.log + } >&2 + exit 1 +fi + if ! grep --quiet --perl-regexp --only-matching '.+Done \(.+\)\! For help, type "help" or "\?"' "$SERVERLOG"; then { printf 'Server did not finish startup:'