From d3058d01f5df711d884d94a713ec7120a4eb62d9 Mon Sep 17 00:00:00 2001 From: Christian Fuchs Date: Tue, 15 Oct 2013 15:28:33 +0000 Subject: [PATCH] more work on the sp_test --- src/scalarproduct/test_scalarproduct.sh | 28 ++++++++++--------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/scalarproduct/test_scalarproduct.sh b/src/scalarproduct/test_scalarproduct.sh index ee828e4aa..0ac0d82fc 100755 --- a/src/scalarproduct/test_scalarproduct.sh +++ b/src/scalarproduct/test_scalarproduct.sh @@ -1,26 +1,20 @@ #!/bin/bash #necessary to make the testing prefix deterministic, so we can access the config files -GNUNET_TESTING_PREFIX=/tmp/test-scalarproduct1337 -CFGA="-c ./test_scalarproduct_alice.conf" -CFGB="-c ./test_scalarproduct_bob.conf" - #can't use ` directly -SESSIONDATA="-k AAAA -e 10,10,10" -EXPECTED="2C0" - -gnunet-arm -s $CFGA -sleep 2 -gnunet-arm -s $CFGB -sleep 2 +GNUNET_TESTING_PREFIX=/tmp/test-scalarproduct`date +%H%M%S` +CFGALICE="-c $GNUNET_TESTING_PREFIX/0/config" +CFGBOB="-c $GNUNET_TESTING_PREFIX/1/config" -IDB=`gnunet-peerinfo -s $CFGB | awk -F "\x60" '{print $2}' | awk -F "'" '{print $1}'` +../testbed/gnunet-testbed-profiler -c test_scalarproduct.conf -p 2 2>gnunet_error.log & +sleep 5 -gnunet-scalarproduct $CFGB $SESSIONDATA - -RESULT=`gnunet-scalarproduct $CFGA $SESSIONDATA -p $IDB` +PEERIDBOB=`gnunet-peerinfo -qs $CFGB` +INPUTALICE="-k AAAA -e 10,10,10" +INPUTBOB="-k AAAA -e 10,10,10" +EXPECTED="2C0" -gnunet-arm -e $CFGA & -gnunet-arm -e $CFGB & +gnunet-scalarproduct $CFGBOB $INPUTBOB +RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB 2>client_error.log` if [ "$RESULT" == "$EXPECTED" ] then -- 2.25.1