diff options
Diffstat (limited to 'src/scalarproduct/test_scalarproduct_negative.sh')
-rwxr-xr-x | src/scalarproduct/test_scalarproduct_negative.sh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/scalarproduct/test_scalarproduct_negative.sh b/src/scalarproduct/test_scalarproduct_negative.sh index eb9ead4bf..cbeb1b9fd 100755 --- a/src/scalarproduct/test_scalarproduct_negative.sh +++ b/src/scalarproduct/test_scalarproduct_negative.sh | |||
@@ -11,6 +11,8 @@ PREFIX=/tmp/test-scalarproduct`date +%H%M%S` | |||
11 | CFGALICE="-c $PREFIX/0/config" | 11 | CFGALICE="-c $PREFIX/0/config" |
12 | CFGBOB="-c $PREFIX/1/config" | 12 | CFGBOB="-c $PREFIX/1/config" |
13 | 13 | ||
14 | which timeout &> /dev/null && DO_TIMEOUT="timeout 15" | ||
15 | |||
14 | # launch two peers in line topology non-interactively | 16 | # launch two peers in line topology non-interactively |
15 | # | 17 | # |
16 | # interactive mode would terminate the test immediately | 18 | # interactive mode would terminate the test immediately |
@@ -23,12 +25,12 @@ PID=$! | |||
23 | sleep 5 | 25 | sleep 5 |
24 | 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 | #RESULT=`GNUNET_LOG=';;;;DEBUG' | 32 | #RESULT=`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 |