source: mod_gnutls/debian/patches/0001-avoid-unnecessary-use-of-bc.patch @ 72e291f

debian/masterdebian/stretch-backportsjessie-backports
Last change on this file since 72e291f was 72e291f, checked in by Daniel Kahn Gillmor <dkg@…>, 5 years ago

avoid use of bc in test suite

  • Property mode set to 100644
File size: 1.0 KB
RevLine 
[72e291f]1From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2Date: Thu, 17 Sep 2015 05:06:34 -0400
3Subject: avoid unnecessary use of bc
4
5test/runtests has a shebang line of /bin/bash.  we can make use of
6bashisms to avoid depending on bc.
7---
8 test/runtests | 4 ++--
9 1 file changed, 2 insertions(+), 2 deletions(-)
10
11diff --git a/test/runtests b/test/runtests
12index bf172ec..355df8f 100755
13--- a/test/runtests
14+++ b/test/runtests
15@@ -129,7 +129,7 @@ if [ -n "${USE_MSVA}" ]; then
16     # wait at most TEST_MSVA_MAX_WAIT seconds for MSVA to get ready
17     waited=0.0
18     until [ ${ret} -eq 0 ] \
19-             || [ $(echo "${waited} > ${TEST_MSVA_MAX_WAIT}" | bc) -eq 1 ]; do
20+             || [ "${waited}" -gt "${TEST_MSVA_MAX_WAIT}" ]; do
21        if msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem
22        then
23            ret=0
24@@ -137,7 +137,7 @@ if [ -n "${USE_MSVA}" ]; then
25            echo "MSVA not ready yet"
26        fi
27        sleep "${TEST_GAP}"
28-       waited=$(echo "${waited} + ${TEST_GAP}" | bc)
29+       waited=$((${waited} + ${TEST_GAP}))
30     done
31 
32     # check if MSVA is up, fail if not
Note: See TracBrowser for help on using the repository browser.