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/t0400-em-async-app.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 't/t0400-em-async-app.sh') diff --git a/t/t0400-em-async-app.sh b/t/t0400-em-async-app.sh index 34da2ad..fd21f5b 100755 --- a/t/t0400-em-async-app.sh +++ b/t/t0400-em-async-app.sh @@ -23,7 +23,7 @@ t_begin "setup and start" && { } t_begin "send async requests off in parallel" && { - t0=$(date +%s) + t0=$(unix_time) curl --no-buffer -sSf http://$listen/ > $a 2>> $curl_err & curl --no-buffer -sSf http://$listen/ > $b 2>> $curl_err & curl --no-buffer -sSf http://$listen/ > $c 2>> $curl_err & @@ -31,7 +31,7 @@ t_begin "send async requests off in parallel" && { t_begin "wait for curl terminations" && { wait - t1=$(date +%s) + t1=$(unix_time) elapsed=$(( $t1 - $t0 )) t_info "elapsed=$elapsed" } -- cgit v1.2.3-24-ge0c7