Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions .github/workflows/full-mpich.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- develop
- master
- slegrand-actions-debug

pull_request:
branches:
Expand Down Expand Up @@ -73,8 +72,7 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
Expand Down Expand Up @@ -150,8 +148,7 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/full-msmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- develop
- master
- slegrand-actions-debug

pull_request:
branches:
Expand Down Expand Up @@ -106,6 +105,5 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh
4 changes: 1 addition & 3 deletions .github/workflows/full-openmpi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
branches:
- develop
- master
- slegrand-actions-debug

pull_request:
branches:
Expand Down Expand Up @@ -73,8 +72,7 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/minimal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- develop
- master
- slegrand-actions-debug

pull_request:
branches:
Expand Down Expand Up @@ -49,8 +48,7 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
Expand Down Expand Up @@ -88,8 +86,7 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
Expand Down Expand Up @@ -139,6 +136,5 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh
10 changes: 3 additions & 7 deletions .github/workflows/sequential.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ on:
branches:
- develop
- master
- slegrand-actions-debug

pull_request:
branches:
Expand Down Expand Up @@ -51,8 +50,7 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
Expand Down Expand Up @@ -89,8 +87,7 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh

- name: Install
Expand Down Expand Up @@ -146,6 +143,5 @@ jobs:

- name: Check
run: |
make check
echo "Tests failed: " $(grep :test-result examples/*/*.trs | grep FAIL | wc -l)
make check -i
./etc/actions/failed_tests_logs.sh
26 changes: 19 additions & 7 deletions etc/actions/failed_tests_logs.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
#!/usr/bin/env bash

FAILED_TESTS=( $(grep :test-result examples/*/*.trs | grep FAIL) )
# This script checks if tests have failed. If yes, it prints the content of the
# failed tests log, and returns 1.
#
# It allows keeping the '-i' option for 'make check', print the failed
# tests, and only then, return exit 1 to interrupt the CI pipeline.

for val in ${FAILED_TESTS[@]/#*FAIL/}
do
IFS="::"
read -ra path <<< $val
FAILED_TESTS=$(grep ":test-result: FAIL" examples/*/*.trs)

if [ -z "$FAILED_TESTS" ]; then
exit 0;
fi

NB_FAILED_TESTS=$(echo "$FAILED_TESTS" | wc -l)
echo "$NB_FAILED_TESTS tests failed:"

echo "$FAILED_TESTS" | while IFS= read -r line; do
path="${line%::test-result: FAIL}"
printf "\n******** ${path%.*}.log ********\n\n"
tail -n 100 ${path%.*}.log
unset IFS
done;
done

exit 1
Loading