diff options
Diffstat (limited to 'src/scalarproduct/test_scalarproduct.sh')
-rwxr-xr-x | src/scalarproduct/test_scalarproduct.sh | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/scalarproduct/test_scalarproduct.sh b/src/scalarproduct/test_scalarproduct.sh index 5ba94f641..4a3b77428 100755 --- a/src/scalarproduct/test_scalarproduct.sh +++ b/src/scalarproduct/test_scalarproduct.sh | |||
@@ -13,10 +13,11 @@ CFGBOB="-c $PREFIX/1/config" | |||
13 | 13 | ||
14 | # launch two peers in line topology non-interactively | 14 | # launch two peers in line topology non-interactively |
15 | # | 15 | # |
16 | # interactive mode would terminate the test immediately | 16 | # interactive mode would terminate the test immediately |
17 | # because the rest of the script is already in stdin, | 17 | # because the rest of the script is already in stdin, |
18 | # thus redirecting stdin does not suffice) | 18 | # thus redirecting stdin does not suffice) |
19 | GNUNET_LOG='scalarproduct;;;;DEBUG' GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 & | 19 | #GNUNET_LOG='scalarproduct;;;;DEBUG' |
20 | GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 & | ||
20 | PID=$! | 21 | PID=$! |
21 | # 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 |
22 | sleep 5 | 23 | sleep 5 |
@@ -24,11 +25,13 @@ sleep 5 | |||
24 | # get bob's peer ID, necessary for alice | 25 | # get bob's peer ID, necessary for alice |
25 | PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` | 26 | PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` |
26 | 27 | ||
27 | GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGBOB $INPUTBOB & | 28 | #GNUNET_LOG=';;;;DEBUG' |
28 | RESULT=`GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` | 29 | gnunet-scalarproduct $CFGBOB $INPUTBOB & |
30 | GNUNET_LOG=';;;;DEBUG' | ||
31 | RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` | ||
29 | 32 | ||
30 | # terminate the testbed | 33 | # terminate the testbed |
31 | kill $PID | 34 | kill $PID |
32 | 35 | ||
33 | EXPECTED="0CCC" | 36 | EXPECTED="0CCC" |
34 | if [ "$RESULT" == "$EXPECTED" ] | 37 | if [ "$RESULT" == "$EXPECTED" ] |