diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-10-15 15:28:33 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-10-15 15:28:33 +0000 |
commit | d3058d01f5df711d884d94a713ec7120a4eb62d9 (patch) | |
tree | 32f1e21fda9c519e95674c6ecf16157e0a06d001 /src/scalarproduct/test_scalarproduct.sh | |
parent | 2df6a596bda118b3d2bb603799fb275702270610 (diff) | |
download | gnunet-d3058d01f5df711d884d94a713ec7120a4eb62d9.tar.gz gnunet-d3058d01f5df711d884d94a713ec7120a4eb62d9.zip |
more work on the sp_test
Diffstat (limited to 'src/scalarproduct/test_scalarproduct.sh')
-rwxr-xr-x | src/scalarproduct/test_scalarproduct.sh | 28 |
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 |
4 | GNUNET_TESTING_PREFIX=/tmp/test-scalarproduct1337 | 4 | GNUNET_TESTING_PREFIX=/tmp/test-scalarproduct`date +%H%M%S` |
5 | CFGA="-c ./test_scalarproduct_alice.conf" | 5 | CFGALICE="-c $GNUNET_TESTING_PREFIX/0/config" |
6 | CFGB="-c ./test_scalarproduct_bob.conf" | 6 | CFGBOB="-c $GNUNET_TESTING_PREFIX/1/config" |
7 | #can't use ` directly | ||
8 | SESSIONDATA="-k AAAA -e 10,10,10" | ||
9 | EXPECTED="2C0" | ||
10 | |||
11 | gnunet-arm -s $CFGA | ||
12 | sleep 2 | ||
13 | gnunet-arm -s $CFGB | ||
14 | sleep 2 | ||
15 | 7 | ||
16 | IDB=`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 & |
9 | sleep 5 | ||
17 | 10 | ||
18 | gnunet-scalarproduct $CFGB $SESSIONDATA | 11 | PEERIDBOB=`gnunet-peerinfo -qs $CFGB` |
19 | 12 | INPUTALICE="-k AAAA -e 10,10,10" | |
20 | RESULT=`gnunet-scalarproduct $CFGA $SESSIONDATA -p $IDB` | 13 | INPUTBOB="-k AAAA -e 10,10,10" |
14 | EXPECTED="2C0" | ||
21 | 15 | ||
22 | gnunet-arm -e $CFGA & | 16 | gnunet-scalarproduct $CFGBOB $INPUTBOB |
23 | gnunet-arm -e $CFGB & | 17 | RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB 2>client_error.log` |
24 | 18 | ||
25 | if [ "$RESULT" == "$EXPECTED" ] | 19 | if [ "$RESULT" == "$EXPECTED" ] |
26 | then | 20 | then |