diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-27 14:02:13 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-27 14:02:13 +0000 |
commit | 68a09c195d33239193f160dfabef54a6dbf0d239 (patch) | |
tree | 88251180ebc9e616bd87a23bd6c0e6f0da23d978 /src/scalarproduct | |
parent | b0990df82b0e8ff831cbb01ed9fd1d6b4e592b8e (diff) | |
download | gnunet-68a09c195d33239193f160dfabef54a6dbf0d239.tar.gz gnunet-68a09c195d33239193f160dfabef54a6dbf0d239.zip |
add timeouts to test
Diffstat (limited to 'src/scalarproduct')
-rwxr-xr-x | src/scalarproduct/test_scalarproduct_negativezero.sh | 8 |
1 files changed, 5 insertions, 3 deletions
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=$! | |||
22 | # sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe | 22 | # sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe |
23 | sleep 5 | 23 | sleep 5 |
24 | 24 | ||
25 | which timeout &> /dev/null && DO_TIMEOUT="timeout 15" | ||
26 | |||
25 | # get bob's peer ID, necessary for alice | 27 | # get bob's peer ID, necessary for alice |
26 | PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` | 28 | PEERIDBOB=`${DO_TIMEOUT} gnunet-peerinfo -qs $CFGBOB` |
27 | 29 | ||
28 | #GNUNET_LOG=';;;;DEBUG' | 30 | #GNUNET_LOG=';;;;DEBUG' |
29 | gnunet-scalarproduct $CFGBOB $INPUTBOB & | 31 | ${DO_TIMEOUT} gnunet-scalarproduct $CFGBOB $INPUTBOB & |
30 | #GNUNET_LOG=';;;;DEBUG' | 32 | #GNUNET_LOG=';;;;DEBUG' |
31 | RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` | 33 | RESULT=`${DO_TIMEOUT} gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` |
32 | 34 | ||
33 | # terminate the testbed | 35 | # terminate the testbed |
34 | kill $PID | 36 | kill $PID |