X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fscalarproduct%2Ftest_scalarproduct_negativezero.sh;h=1ab7157af89ce60e6e9816016be770f6c219a243;hb=ea1d45f9f6fda99b0e8dd3ada75433b650983113;hp=0a6b9b65c9981e7254a06ad280bbb261d883d790;hpb=96c662b7ea85239834a35aa8d132bc4ee42afffd;p=oweals%2Fgnunet.git diff --git a/src/scalarproduct/test_scalarproduct_negativezero.sh b/src/scalarproduct/test_scalarproduct_negativezero.sh index 0a6b9b65c..1ab7157af 100755 --- a/src/scalarproduct/test_scalarproduct_negativezero.sh +++ b/src/scalarproduct/test_scalarproduct_negativezero.sh @@ -22,13 +22,15 @@ PID=$! # sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe sleep 5 +which timeout &> /dev/null && DO_TIMEOUT="timeout 15" + # get bob's peer ID, necessary for alice -PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` +PEERIDBOB=`${DO_TIMEOUT} gnunet-peerinfo -qs $CFGBOB` #GNUNET_LOG=';;;;DEBUG' -gnunet-scalarproduct $CFGBOB $INPUTBOB & +${DO_TIMEOUT} gnunet-scalarproduct $CFGBOB $INPUTBOB & #GNUNET_LOG=';;;;DEBUG' -RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` +RESULT=`${DO_TIMEOUT} gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` # terminate the testbed kill $PID