diff options
author | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-10-18 14:10:02 +0000 |
---|---|---|
committer | Christian Fuchs <christian.fuchs@cfuchs.net> | 2013-10-18 14:10:02 +0000 |
commit | bf2bb90b9e4857ee7575d6d54f1a0ef84e8f2847 (patch) | |
tree | 8ef2ce0dd211b078edcee1afdc358ec50e004e7a /src/scalarproduct/test_scalarproduct.sh | |
parent | 34365eb5c053d520dce3cc1f90921dc03e42fcdf (diff) | |
download | gnunet-bf2bb90b9e4857ee7575d6d54f1a0ef84e8f2847.tar.gz gnunet-bf2bb90b9e4857ee7575d6d54f1a0ef84e8f2847.zip |
fixed type in SP-test template
Diffstat (limited to 'src/scalarproduct/test_scalarproduct.sh')
-rwxr-xr-x | src/scalarproduct/test_scalarproduct.sh | 19 |
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? |
11 | CFGALICE="-c $PREFIX/0/config" | 11 | CFGALICE="-c $PREFIX/0/config" |
12 | CFGBOB="-c $PREFIX/1/config" | 12 | CFGBOB="-c $PREFIX/1/config" |
13 | # log at which loglevel? | ||
14 | LOGLEVEL=DEBUG | ||
15 | 13 | ||
16 | echo 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) |
22 | GNUNET_LOG="scalarproduct;;;;$LOGLEVEL" GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 2>service.log & | 19 | GNUNET_LOG='scalarproduct;;;;DEBUG' GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 2>service.log & |
23 | sleep 2 | 20 | sleep 5 |
24 | echo tesbed up | ||
25 | 21 | ||
26 | # get bob's peer ID, necessary for alice | 22 | # get bob's peer ID, necessary for alice |
27 | PEERIDBOB=`gnunet-peerinfo -qs $CFGB` | 23 | PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` |
28 | echo peerinfo receivd | ||
29 | 24 | ||
30 | GNUNET_LOG="scalarproduct;;;;$LOGLEVEL" gnunet-scalarproduct $CFGBOB $INPUTBOB 2>bob.log & | 25 | GNUNET_LOG='scalarproduct;;;;DEBUG' gnunet-scalarproduct $CFGBOB $INPUTBOB 2>bob.log & |
31 | echo bob started | 26 | GNUNET_LOG='scalarproduct;;;;DEBUG' gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB 2>alice.log |
32 | GNUNET_LOG="scalarproduct;;;;$LOGLEVEL" gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB 2>alice.log | ||
33 | echo alice returned | ||
34 | 27 | ||
35 | # termiante the testbed | 28 | # termiante the testbed |
36 | kill $( pgrep -P $$ | tr '\n' ' ' ) | 29 | kill $( pgrep -P $$ | tr '\n' ' ' ) |
37 | echo killed testbed | 30 | #rm alice.log bob.log service.log |
38 | 31 | ||
39 | EXPECTED="12C" | 32 | EXPECTED="12C" |
40 | if [ "$RESULT" == "$EXPECTED" ] | 33 | if [ "$RESULT" == "$EXPECTED" ] |