2 # compute a simple scalar product
4 #necessary to make the testing prefix deterministic, so we can access the config files
5 PREFIX=/tmp/test-scalarproduct`date +%H%M%S`
7 #where can we find the peers config files?
8 CFGALICE="-c $PREFIX/0/config"
9 CFGBOB="-c $PREFIX/1/config"
11 #log at which loglevel?
14 #launch two peers in line topology
15 GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler $LOG -c test_scalarproduct.conf -p 2 2>gnunet_error.log &
18 #get bob's peer ID, necessary for alice
19 PEERIDBOB=`gnunet-peerinfo -qs $CFGB`
21 #payload for this test on both sides
22 INPUTALICE="-k AAAA -e 10,10,10"
23 INPUTBOB="-k AAAA -e 10,10,10"
25 echo "gnunet-scalarproduct $LOG $CFGBOB $INPUTBOB &"
26 echo "gnunet-scalarproduct $LOG $CFGALICE $INPUTALICE -p $PEERIDBOB -L ERROR"
27 gnunet-scalarproduct $LOG $CFGBOB $INPUTBOB 2>bob_error.log &
28 RESULT=`gnunet-scalarproduct $LOG $CFGALICE $INPUTALICE -p $PEERIDBOB 2>alice_error.log`
31 if [ "$RESULT" == "$EXPECTED" ]
36 echo "Result $RESULT NOTOK"