From 0ba6fc3c30b9cf530faf7fcf5ce7be519ec13fe7 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 24 Jan 2013 23:13:41 +0000 Subject: tests: replace non-portable "date +%s" with ruby equivalent "date +%s" is not in POSIX (it is in GNU, and at least FreeBSD 9.0, possibly earlier). The Ruby equivalent should be sufficiently portable between different Ruby versions. This change was automated via: perl -i -p -e 's/date \+%s/unix_time/' t/*.sh --- t/t0003-reopen-logs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t0003-reopen-logs.sh') diff --git a/t/t0003-reopen-logs.sh b/t/t0003-reopen-logs.sh index 910a0a5..8e2cdc5 100755 --- a/t/t0003-reopen-logs.sh +++ b/t/t0003-reopen-logs.sh @@ -17,7 +17,7 @@ t_begin "ensure server is responsive" && { } t_begin "start $nr_client concurrent requests" && { - start=$(date +%s) + start=$(unix_time) for i in $(awk "BEGIN{for(i=0;i<$nr_client;++i) print i}" > $curl_out 2>> $curl_err ) & @@ -59,7 +59,7 @@ dbgcat r_err t_begin "wait curl requests to finish" && { wait - t_info elapsed=$(( $(date +%s) - $start )) + t_info elapsed=$(( $(unix_time) - $start )) } t_begin "ensure no errors from curl" && { -- cgit v1.2.3-24-ge0c7