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

debian/masterdebian/stretch-backportsjessie-backports
Last change on this file since 37589bb 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
  • test/runtests

    From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
    Date: Thu, 17 Sep 2015 05:06:34 -0400
    Subject: avoid unnecessary use of bc
    
    test/runtests has a shebang line of /bin/bash.  we can make use of
    bashisms to avoid depending on bc.
    ---
     test/runtests | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/test/runtests b/test/runtests
    index bf172ec..355df8f 100755
    a b if [ -n "${USE_MSVA}" ]; then 
    129129    # wait at most TEST_MSVA_MAX_WAIT seconds for MSVA to get ready
    130130    waited=0.0
    131131    until [ ${ret} -eq 0 ] \
    132               || [ $(echo "${waited} > ${TEST_MSVA_MAX_WAIT}" | bc) -eq 1 ]; do
     132              || [ "${waited}" -gt "${TEST_MSVA_MAX_WAIT}" ]; do
    133133        if msva-query-agent https "$(cat client.uid)" x509pem client < client/x509.pem
    134134        then
    135135            ret=0
    if [ -n "${USE_MSVA}" ]; then 
    137137            echo "MSVA not ready yet"
    138138        fi
    139139        sleep "${TEST_GAP}"
    140         waited=$(echo "${waited} + ${TEST_GAP}" | bc)
     140        waited=$((${waited} + ${TEST_GAP}))
    141141    done
    142142
    143143    # check if MSVA is up, fail if not
Note: See TracBrowser for help on using the repository browser.