From: Christian Grothoff Date: Mon, 27 Jun 2016 14:02:13 +0000 (+0000) Subject: add timeouts to test X-Git-Tag: initial-import-from-subversion-38251~673 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=68a09c195d33239193f160dfabef54a6dbf0d239;p=oweals%2Fgnunet.git add timeouts to test --- 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