Skip to content

Commit

Permalink
CI: timeout not available on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
vhotspur committed Nov 20, 2024
1 parent 1bd2443 commit 702454d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion tools/ci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,22 @@ get_jvm_workaround_args() {
esac
}

timeout_with_thread_dump() {
if command -v timeout >/dev/null; then
TIMEOUT_IMPL=timeout_with_thread_dump_real
else
TIMEOUT_IMPL=timeout_with_thread_dump_fake
fi

timeout_with_thread_dump_real() {
timeout --signal=3 --kill-after=5s "$@"
}
timeout_with_thread_dump_fake() {
shift
"$@"
}
timeout_with_thread_dump() {
"$TIMEOUT_IMPL" "$@"
}


# Make sure we are in the top-level directory so that we can use
Expand Down

0 comments on commit 702454d

Please sign in to comment.