diff --git a/.github/run_test.sh b/.github/run_test.sh index 74ab2423c..bd6fb7b7b 100755 --- a/.github/run_test.sh +++ b/.github/run_test.sh @@ -21,18 +21,6 @@ if [ ! -z "$SUDO" ] && [ ! -z "$TEST_SSH_HOSTBASED_AUTH" ]; then done fi -output_failed_logs() { - for i in regress/failed*.log; do - if [ -f "$i" ]; then - echo ------------------------------------------------------------------------- - echo LOGFILE $i - cat $i - echo ------------------------------------------------------------------------- - fi - done -} -trap output_failed_logs 0 - env="" if [ ! -z "${SUDO}" ]; then env="${env} SUDO=${SUDO}" diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 903ed64b5..cb6c69dad 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -143,6 +143,9 @@ jobs: env: TEST_SSH_UNSAFE_PERMISSIONS: 1 TEST_SSH_HOSTBASED_AUTH: yes + - name: show logs + if: failure() + run: for i in regress/failed*.log; do echo ====; echo logfile $i; echo =====; cat $i; done - name: save logs if: failure() uses: actions/upload-artifact@main diff --git a/.github/workflows/selfhosted.yml b/.github/workflows/selfhosted.yml index d892a28c3..9f2bd99eb 100644 --- a/.github/workflows/selfhosted.yml +++ b/.github/workflows/selfhosted.yml @@ -129,6 +129,9 @@ jobs: - name: make tests run: vmrun ./.github/run_test.sh ${{ matrix.config }} timeout-minutes: 600 + - name: show logs + if: failure() + run: vmrun 'for i in regress/failed*.log; do echo ====; echo logfile $i; echo =====; cat $i; done' - name: save logs if: failure() uses: actions/upload-artifact@main