aboutsummaryrefslogtreecommitdiff
path: root/src/scalarproduct/test_scalarproduct.sh
diff options
context:
space:
mode:
authorChristian Fuchs <christian.fuchs@cfuchs.net>2013-10-18 14:10:02 +0000
committerChristian Fuchs <christian.fuchs@cfuchs.net>2013-10-18 14:10:02 +0000
commitbf2bb90b9e4857ee7575d6d54f1a0ef84e8f2847 (patch)
tree8ef2ce0dd211b078edcee1afdc358ec50e004e7a /src/scalarproduct/test_scalarproduct.sh
parent34365eb5c053d520dce3cc1f90921dc03e42fcdf (diff)
downloadgnunet-bf2bb90b9e4857ee7575d6d54f1a0ef84e8f2847.tar.gz
gnunet-bf2bb90b9e4857ee7575d6d54f1a0ef84e8f2847.zip
fixed type in SP-test template
Diffstat (limited to 'src/scalarproduct/test_scalarproduct.sh')
-rwxr-xr-xsrc/scalarproduct/test_scalarproduct.sh19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/scalarproduct/test_scalarproduct.sh b/src/scalarproduct/test_scalarproduct.sh
index eaffd925d..0a0fc6578 100755
--- a/src/scalarproduct/test_scalarproduct.sh
+++ b/src/scalarproduct/test_scalarproduct.sh
@@ -10,31 +10,24 @@ PREFIX=/tmp/test-scalarproduct`date +%H%M%S`
10# where can we find the peers config files? 10# where can we find the peers config files?
11CFGALICE="-c $PREFIX/0/config" 11CFGALICE="-c $PREFIX/0/config"
12CFGBOB="-c $PREFIX/1/config" 12CFGBOB="-c $PREFIX/1/config"
13# log at which loglevel?
14LOGLEVEL=DEBUG
15 13
16echo start
17# launch two peers in line topology non-interactively 14# launch two peers in line topology non-interactively
18# 15#
19# interactive mode would terminate the test immediately 16# interactive mode would terminate the test immediately
20# because the rest of the script is already in stdin, 17# because the rest of the script is already in stdin,
21# thus redirecting stdin does not suffice) 18# thus redirecting stdin does not suffice)
22GNUNET_LOG="scalarproduct;;;;$LOGLEVEL" GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 2>service.log & 19GNUNET_LOG='scalarproduct;;;;DEBUG' GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 2>service.log &
23sleep 2 20sleep 5
24echo tesbed up
25 21
26# get bob's peer ID, necessary for alice 22# get bob's peer ID, necessary for alice
27PEERIDBOB=`gnunet-peerinfo -qs $CFGB` 23PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB`
28echo peerinfo receivd
29 24
30GNUNET_LOG="scalarproduct;;;;$LOGLEVEL" gnunet-scalarproduct $CFGBOB $INPUTBOB 2>bob.log & 25GNUNET_LOG='scalarproduct;;;;DEBUG' gnunet-scalarproduct $CFGBOB $INPUTBOB 2>bob.log &
31echo bob started 26GNUNET_LOG='scalarproduct;;;;DEBUG' gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB 2>alice.log
32GNUNET_LOG="scalarproduct;;;;$LOGLEVEL" gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB 2>alice.log
33echo alice returned
34 27
35# termiante the testbed 28# termiante the testbed
36kill $( pgrep -P $$ | tr '\n' ' ' ) 29kill $( pgrep -P $$ | tr '\n' ' ' )
37echo killed testbed 30#rm alice.log bob.log service.log
38 31
39EXPECTED="12C" 32EXPECTED="12C"
40if [ "$RESULT" == "$EXPECTED" ] 33if [ "$RESULT" == "$EXPECTED" ]