Skip to content

Commit

Permalink
improve retries
Browse files Browse the repository at this point in the history
make logging more explicit and do not use /tmp incase it is cleared.
  • Loading branch information
leej3 committed May 9, 2024
1 parent 21d0482 commit 00cd5fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,15 @@ jobs:
command: SKIP_DISTRIB_TESTS=${{ matrix.skip-distrib-tests }} bash tests/run_cpu_tests.sh
on_retry_command: |
echo sending kill signal until process group no longer exists...
tests_pid=$(cat /tmp/ignite_testing.pid)
kill -0 -- -$tests_pid && kill -INT -- -$tests_pid && sleep 5
while kill -0 -- -$tests_pid > /dev/null 2>&1; do kill -9 -- -$tests_pid; sleep 3; done
if [ -f .ignite_testing.pid ] && [ -s .ignite_testing.pid ]; then
tests_pid=$(cat .ignite_testing.pid)
kill -0 -- -$tests_pid && kill -INT -- -$tests_pid && sleep 5
set -x
while kill -0 -- -$tests_pid > /dev/null 2>&1; do kill -9 -- -$tests_pid; sleep 3; done
else
echo "File .ignite_testing.pid does not exist or is empty"
fi
new_command_on_retry: USE_LAST_FAILED=1 SKIP_DISTRIB_TESTS=${{ matrix.skip-distrib-tests }} bash tests/run_cpu_tests.sh

- name: Upload coverage to Codecov
Expand Down
2 changes: 1 addition & 1 deletion tests/common-test-functionality.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ run_tests() {
# Always clean up pytest.ini
trap 'rm -f pytest.ini' RETURN
# write out the process id so that we can send signals...
echo $$ > /tmp/ignite_testing.pid
echo $$ > .ignite_testing.pid
# Parse arguments
while [[ $# -gt 0 ]]
do
Expand Down

0 comments on commit 00cd5fd

Please sign in to comment.