Skip to content

Commit 22726df

Browse files
committed
tools: sim_repeater: Allow repeating after successfull returns
Signed-off-by: Jan Malek <[email protected]>
1 parent 1ce0a2a commit 22726df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/sim_repeater.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ for (( i=1; i<="${SIM_TRIES}"; i++ )); do
1818
"$@" 2>&1 | tee "${TEMP_LOGS}/${i}"
1919
RESULT=$?
2020

21-
if [ -n "${SIM_RETRY_CONDITION}" ] && [ $RESULT != 0 ]; then
21+
if [[ -n "${SIM_RETRY_CONDITION}" && ( $RESULT != 0 || $SIM_RETRY_IGNORE_EXIT_CODE = 1 ) ]]; then
2222
if grep -E "${SIM_RETRY_CONDITION}" "${TEMP_LOGS}/${i}" &> /dev/null; then
2323
echo "Retry condition encountered. Retrying in ${RETRY_COOLDOWN}s"
2424
echo ''

0 commit comments

Comments
 (0)