aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct/test_scalarproduct.sh
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-10-15 15:28:33 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-10-15 15:28:33 +0000
commitd3058d01f5df711d884d94a713ec7120a4eb62d9 (patch)
tree32f1e21fda9c519e95674c6ecf16157e0a06d001 /src/scalarproduct/test_scalarproduct.sh
parent2df6a596bda118b3d2bb603799fb275702270610 (diff)
downloadgnunet-d3058d01f5df711d884d94a713ec7120a4eb62d9.tar.gz
gnunet-d3058d01f5df711d884d94a713ec7120a4eb62d9.zip
more work on the sp_test
Diffstat (limited to 'src/scalarproduct/test_scalarproduct.sh')
-rwxr-xr-xsrc/scalarproduct/test_scalarproduct.sh28
1 files 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 @@
1#!/bin/bash 1#!/bin/bash
2 2
3#necessary to make the testing prefix deterministic, so we can access the config files 3#necessary to make the testing prefix deterministic, so we can access the config files
4GNUNET_TESTING_PREFIX=/tmp/test-scalarproduct1337 4GNUNET_TESTING_PREFIX=/tmp/test-scalarproduct`date +%H%M%S`
5CFGA="-c ./test_scalarproduct_alice.conf" 5CFGALICE="-c $GNUNET_TESTING_PREFIX/0/config"
6CFGB="-c ./test_scalarproduct_bob.conf" 6CFGBOB="-c $GNUNET_TESTING_PREFIX/1/config"
7 #can't use ` directly
8SESSIONDATA="-k AAAA -e 10,10,10"
9EXPECTED="2C0"
10
11gnunet-arm -s $CFGA
12sleep 2
13gnunet-arm -s $CFGB
14sleep 2
15 7
16IDB=`gnunet-peerinfo -s $CFGB | awk -F "\x60" '{print $2}' | awk -F "'" '{print $1}'` 8../testbed/gnunet-testbed-profiler -c test_scalarproduct.conf -p 2 2>gnunet_error.log &
9sleep 5
17 10
18gnunet-scalarproduct $CFGB $SESSIONDATA 11PEERIDBOB=`gnunet-peerinfo -qs $CFGB`
19 12INPUTALICE="-k AAAA -e 10,10,10"
20RESULT=`gnunet-scalarproduct $CFGA $SESSIONDATA -p $IDB` 13INPUTBOB="-k AAAA -e 10,10,10"
14EXPECTED="2C0"
21 15
22gnunet-arm -e $CFGA & 16gnunet-scalarproduct $CFGBOB $INPUTBOB
23gnunet-arm -e $CFGB & 17RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB 2>client_error.log`
24 18
25if [ "$RESULT" == "$EXPECTED" ] 19if [ "$RESULT" == "$EXPECTED" ]
26then 20then