tests: avoid portability problem with dash vs. local v=$splittable_val
authorPádraig Brady <P@draigBrady.com>
Mon, 8 Nov 2010 10:26:08 +0000 (11:26 +0100)
committerJim Meyering <meyering@redhat.com>
Mon, 8 Nov 2010 10:26:08 +0000 (11:26 +0100)
* tests/init.cfg (retry_delay_): Adjust awk script to print a single
floating point value, rather than many.

tests/init.cfg

index 7786257..97dad17 100644 (file)
@@ -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)