summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/namestore/test_namestore_delete.sh4
-rwxr-xr-xsrc/namestore/test_namestore_lookup.sh4
-rwxr-xr-xsrc/namestore/test_namestore_put.sh4
-rwxr-xr-xsrc/scalarproduct/test_scalarproduct.sh15
-rwxr-xr-xsrc/scalarproduct/test_scalarproduct_negative.sh15
-rwxr-xr-xsrc/scalarproduct/test_scalarproduct_negativezero.sh15
6 files changed, 33 insertions, 24 deletions
diff --git a/src/namestore/test_namestore_delete.sh b/src/namestore/test_namestore_delete.sh
index ec25f45ca..5f9a6890a 100755
--- a/src/namestore/test_namestore_delete.sh
+++ b/src/namestore/test_namestore_delete.sh
@@ -7,10 +7,10 @@ if [ -z $LOCATION ]
7then 7then
8 LOCATION="gnunet-config" 8 LOCATION="gnunet-config"
9fi 9fi
10$LOCATION --version 10$LOCATION --version &> /dev/null
11if test $? != 0 11if test $? != 0
12then 12then
13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" 13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
14 exit 77 14 exit 77
15fi 15fi
16 16
diff --git a/src/namestore/test_namestore_lookup.sh b/src/namestore/test_namestore_lookup.sh
index d1ac42544..18b8eed3e 100755
--- a/src/namestore/test_namestore_lookup.sh
+++ b/src/namestore/test_namestore_lookup.sh
@@ -7,10 +7,10 @@ if [ -z $LOCATION ]
7then 7then
8 LOCATION="gnunet-config" 8 LOCATION="gnunet-config"
9fi 9fi
10$LOCATION --version 10$LOCATION --version &> /dev/null
11if test $? != 0 11if test $? != 0
12then 12then
13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" 13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
14 exit 77 14 exit 77
15fi 15fi
16 16
diff --git a/src/namestore/test_namestore_put.sh b/src/namestore/test_namestore_put.sh
index 1a1ca3a7d..4987a9cd3 100755
--- a/src/namestore/test_namestore_put.sh
+++ b/src/namestore/test_namestore_put.sh
@@ -7,10 +7,10 @@ if [ -z $LOCATION ]
7then 7then
8 LOCATION="gnunet-config" 8 LOCATION="gnunet-config"
9fi 9fi
10$LOCATION --version 10$LOCATION --version &> /dev/null
11if test $? != 0 11if test $? != 0
12then 12then
13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" 13 echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX"
14 exit 77 14 exit 77
15fi 15fi
16 16
diff --git a/src/scalarproduct/test_scalarproduct.sh b/src/scalarproduct/test_scalarproduct.sh
index 5ba94f641..4a3b77428 100755
--- a/src/scalarproduct/test_scalarproduct.sh
+++ b/src/scalarproduct/test_scalarproduct.sh
@@ -13,10 +13,11 @@ CFGBOB="-c $PREFIX/1/config"
13 13
14# launch two peers in line topology non-interactively 14# launch two peers in line topology non-interactively
15# 15#
16# interactive mode would terminate the test immediately 16# interactive mode would terminate the test immediately
17# because the rest of the script is already in stdin, 17# because the rest of the script is already in stdin,
18# thus redirecting stdin does not suffice) 18# thus redirecting stdin does not suffice)
19GNUNET_LOG='scalarproduct;;;;DEBUG' GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 & 19#GNUNET_LOG='scalarproduct;;;;DEBUG'
20GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 &
20PID=$! 21PID=$!
21# sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe 22# sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe
22sleep 5 23sleep 5
@@ -24,11 +25,13 @@ sleep 5
24# get bob's peer ID, necessary for alice 25# get bob's peer ID, necessary for alice
25PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` 26PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB`
26 27
27GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGBOB $INPUTBOB & 28#GNUNET_LOG=';;;;DEBUG'
28RESULT=`GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` 29gnunet-scalarproduct $CFGBOB $INPUTBOB &
30GNUNET_LOG=';;;;DEBUG'
31RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB`
29 32
30# terminate the testbed 33# terminate the testbed
31kill $PID 34kill $PID
32 35
33EXPECTED="0CCC" 36EXPECTED="0CCC"
34if [ "$RESULT" == "$EXPECTED" ] 37if [ "$RESULT" == "$EXPECTED" ]
diff --git a/src/scalarproduct/test_scalarproduct_negative.sh b/src/scalarproduct/test_scalarproduct_negative.sh
index 58a02998d..de6f2b348 100755
--- a/src/scalarproduct/test_scalarproduct_negative.sh
+++ b/src/scalarproduct/test_scalarproduct_negative.sh
@@ -13,10 +13,11 @@ CFGBOB="-c $PREFIX/1/config"
13 13
14# launch two peers in line topology non-interactively 14# launch two peers in line topology non-interactively
15# 15#
16# interactive mode would terminate the test immediately 16# interactive mode would terminate the test immediately
17# because the rest of the script is already in stdin, 17# because the rest of the script is already in stdin,
18# thus redirecting stdin does not suffice) 18# thus redirecting stdin does not suffice)
19GNUNET_LOG='scalarproduct;;;;DEBUG' GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 & 19#GNUNET_LOG='scalarproduct;;;;DEBUG'
20GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 &
20PID=$! 21PID=$!
21# sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe 22# sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe
22sleep 5 23sleep 5
@@ -24,11 +25,13 @@ sleep 5
24# get bob's peer ID, necessary for alice 25# get bob's peer ID, necessary for alice
25PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` 26PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB`
26 27
27GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGBOB $INPUTBOB & 28#GNUNET_LOG=';;;;DEBUG'
28RESULT=`GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` 29gnunet-scalarproduct $CFGBOB $INPUTBOB &
30#RESULT=`GNUNET_LOG=';;;;DEBUG'
31RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB`
29 32
30# terminate the testbed 33# terminate the testbed
31kill $PID 34kill $PID
32 35
33EXPECTED="-0CCC" 36EXPECTED="-0CCC"
34if [ "$RESULT" == "$EXPECTED" ] 37if [ "$RESULT" == "$EXPECTED" ]
diff --git a/src/scalarproduct/test_scalarproduct_negativezero.sh b/src/scalarproduct/test_scalarproduct_negativezero.sh
index e206f3a3a..043b277e7 100755
--- a/src/scalarproduct/test_scalarproduct_negativezero.sh
+++ b/src/scalarproduct/test_scalarproduct_negativezero.sh
@@ -13,10 +13,11 @@ CFGBOB="-c $PREFIX/1/config"
13 13
14# launch two peers in line topology non-interactively 14# launch two peers in line topology non-interactively
15# 15#
16# interactive mode would terminate the test immediately 16# interactive mode would terminate the test immediately
17# because the rest of the script is already in stdin, 17# because the rest of the script is already in stdin,
18# thus redirecting stdin does not suffice) 18# thus redirecting stdin does not suffice)
19GNUNET_LOG='scalarproduct;;;;DEBUG' GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 & 19# GNUNET_LOG='scalarproduct;;;;DEBUG'
20GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 &
20PID=$! 21PID=$!
21# sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe 22# sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe
22sleep 5 23sleep 5
@@ -24,11 +25,13 @@ sleep 5
24# get bob's peer ID, necessary for alice 25# get bob's peer ID, necessary for alice
25PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB` 26PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB`
26 27
27GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGBOB $INPUTBOB & 28#GNUNET_LOG=';;;;DEBUG'
28RESULT=`GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB` 29gnunet-scalarproduct $CFGBOB $INPUTBOB &
30#GNUNET_LOG=';;;;DEBUG'
31RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB`
29 32
30# terminate the testbed 33# terminate the testbed
31kill $PID 34kill $PID
32 35
33EXPECTED="00" 36EXPECTED="00"
34if [ "$RESULT" == "$EXPECTED" ] 37if [ "$RESULT" == "$EXPECTED" ]