Skip to content

Commit

Permalink
Attempt to gather more information for failed tests in CI on Ubuntu.
Browse files Browse the repository at this point in the history
  • Loading branch information
mmuetzel committed Aug 31, 2024
1 parent 65ee9ef commit b1c5ff8
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
compiler-pkgs: "clang"
cc: "clang"
cxx: "clang++"
mpi: with
openmp-cmake-flags: "-DWITH_OpenMP=ON -DOpenMP_C_FLAGS=-fopenmp=libgomp -DOpenMP_CXX_FLAGS=-fopenmp=libgomp -DOpenMP_C_LIB_NAMES='gomp;pthread' -DOpenMP_CXX_LIB_NAMES='gomp;pthread'"
- compiler: clang
compiler-pkgs: "clang"
Expand Down Expand Up @@ -126,7 +127,7 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cd ${GITHUB_WORKSPACE}/build
ctest -L quick -j$(nproc)
set -o pipefail && ctest -L quick -j$(nproc) . | tee ./ctest_output.log
- name: Re-run tests
if: always() && (steps.run-ctest.outcome == 'failure')
Expand All @@ -135,6 +136,21 @@ jobs:
CTEST_OUTPUT_ON_FAILURE: 1
run: |
cd ${GITHUB_WORKSPACE}/build
failed_tests=($(sed -n 's/^.*#[0-9]*\:\s*\(\S*\).*Failed.*/\1/p' ./ctest_output.log))
for test in "${failed_tests[@]}"; do
echo "::group::Content of fem/tests/${test}"
echo ---- Files ----
ls -Rl fem/tests/${test}
if [ -f fem/tests/${test}/test-stderr*.log ]; then
echo ---- Content of test-stderr*.log ----
cat fem/tests/${test}/test-stderr*.log
fi
if [ -f fem/tests/${test}/test-stdout*.log ]; then
echo ---- Content of test-stdout*.log ----
cat fem/tests/${test}/test-stdout*.log
fi
echo "::endgroup::"
done
echo "::group::Re-run failing tests"
ctest --rerun-failed --output-on-failure || true
echo "::endgroup::"
Expand Down

0 comments on commit b1c5ff8

Please sign in to comment.