diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-06-27 14:00:15 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-06-27 14:00:15 +0000 |
commit | b0990df82b0e8ff831cbb01ed9fd1d6b4e592b8e (patch) | |
tree | cb99ed260752778cb0703edb141a732357b9dd25 /src/scalarproduct/test_scalarproduct.sh | |
parent | 7ee0ec4b90a2096226f4dc23f9129fdda1c71488 (diff) | |
download | gnunet-b0990df82b0e8ff831cbb01ed9fd1d6b4e592b8e.tar.gz gnunet-b0990df82b0e8ff831cbb01ed9fd1d6b4e592b8e.zip |
add timeouts to test
Diffstat (limited to 'src/scalarproduct/test_scalarproduct.sh')
-rwxr-xr-x | src/scalarproduct/test_scalarproduct.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/scalarproduct/test_scalarproduct.sh b/src/scalarproduct/test_scalarproduct.sh index dd9bb80a5..c0401beb7 100755 --- a/src/scalarproduct/test_scalarproduct.sh +++ b/src/scalarproduct/test_scalarproduct.sh | |||
@@ -25,13 +25,15 @@ echo "Waiting for peers to start..." | |||
25 | sleep 5 | 25 | sleep 5 |
26 | echo "Running test..." | 26 | echo "Running test..." |
27 | 27 | ||
28 | which timeout &> /dev/null && DO_TIMEOUT="timeout 15" | ||
29 | |||
28 | # get bob's peer ID, necessary for alice | 30 | # get bob's peer ID, necessary for alice |
29 | PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` | 31 | PEERIDBOB=`${DO_TIMEOUT} gnunet-peerinfo -qs $CFGBOB` |
30 | 32 | ||
31 | #GNUNET_LOG=';;;;DEBUG' | 33 | #GNUNET_LOG=';;;;DEBUG' |
32 | gnunet-scalarproduct $CFGBOB $INPUTBOB & | 34 | ${DO_TIMEOUT} gnunet-scalarproduct $CFGBOB $INPUTBOB & |
33 | #GNUNET_LOG=';;;;DEBUG' | 35 | #GNUNET_LOG=';;;;DEBUG' |
34 | RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` | 36 | RESULT=`${DO_TIMEOUT} gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` |
35 | 37 | ||
36 | # terminate the testbed | 38 | # terminate the testbed |
37 | kill $PID | 39 | kill $PID |
@@ -44,4 +46,3 @@ else | |||
44 | echo "Result $RESULT, expected $EXPECTED - NOTOK" | 46 | echo "Result $RESULT, expected $EXPECTED - NOTOK" |
45 | exit 1 | 47 | exit 1 |
46 | fi | 48 | fi |
47 | |||