Skip to content

Commit

Permalink
tests: avoid portability problem with dash vs. local v=$splittable_val
Browse files Browse the repository at this point in the history
* tests/init.cfg (retry_delay_): Adjust awk script to print a single
floating point value, rather than many.
  • Loading branch information
pixelb authored and Jim Meyering committed Nov 8, 2010
1 parent dd45755 commit 4a14a80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/init.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ retry_delay_()
local time_fail
while test $attempt -le $max_n_tries; do
local delay=$($AWK -v n=$num_sleeps -v s="$init_delay" \
'BEGIN { for (i=0;i<n;i++) t = s" "t; print t }')
'BEGIN { print s * n }')
"$test_func" "$delay" && { time_fail=0; break; } || time_fail=1
attempt=$(expr $attempt + 1)
num_sleeps=$(expr $num_sleeps '*' 2)
Expand Down

0 comments on commit 4a14a80

Please sign in to comment.