From f391285f766ea6de9b5b22682f7699b8f01b5ad0 Mon Sep 17 00:00:00 2001 From: Philip Fackler Date: Tue, 19 Nov 2024 12:08:29 -0600 Subject: [PATCH] Handle test failure accurately --- .github/workflows/ci-github-actions.yaml | 3 ++- CI/scripts/run_step.sh | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-github-actions.yaml b/.github/workflows/ci-github-actions.yaml index e29fc189..1bd9ac9e 100644 --- a/.github/workflows/ci-github-actions.yaml +++ b/.github/workflows/ci-github-actions.yaml @@ -3,6 +3,7 @@ name: GitHub Actions CI on: push: branches: + - stable - develop - feature-gh-actions pull_request: @@ -73,7 +74,7 @@ jobs: - name: Configure run: | - export EXTRA_CMAKE_ARGS='-DXolotl_INCLUDE_RN_TPP_FILES=ON -DXolotl_ENABLE_TIMER_TESTS=OFF' + export EXTRA_CMAKE_ARGS='-DXolotl_INCLUDE_RN_TPP_FILES=ON ' CI/scripts/run_step.sh configure env: PATH: ${{ env.PATH }} diff --git a/CI/scripts/run_step.sh b/CI/scripts/run_step.sh index c99d84e1..b7796322 100755 --- a/CI/scripts/run_step.sh +++ b/CI/scripts/run_step.sh @@ -1,9 +1,20 @@ #!/bin/bash +set -e + echo -e "\nCheck gcc and clang compilers\n" gcc --version clang --version +function run_tests () { + cd ${GITHUB_WORKSPACE}/../build + ctest --output-on-failure --label-exclude xolotl.tests.system + local __xolotl_ret=$? + ./test/system/SystemTester -- -t + local __xolotl_sys_ret=$? + return $((__xolotl_ret + __xolotl_sys_ret)) +} + case "$1" in configure) @@ -46,9 +57,7 @@ case "$1" in ;; test) - cd ${GITHUB_WORKSPACE}/../build - ctest -VV --label-exclude xolotl.tests.system - ./test/system/SystemTester -- -t + run_tests ;; *)