Use more-or-equal (some machines are fast enough)
[oweals/gnunet.git] / src / scalarproduct / test_scalarproduct.sh
index 5ba94f6416b89c7efed8a3c318bbc91a094c6f95..4a3b77428fba4f4d6c930f90067e2d07d3095728 100755 (executable)
@@ -13,10 +13,11 @@ CFGBOB="-c $PREFIX/1/config"
 
 # launch two peers in line topology non-interactively
 #
-# interactive mode would terminate the test immediately 
-# because the rest of the script is already in stdin, 
+# interactive mode would terminate the test immediately
+# because the rest of the script is already in stdin,
 # thus redirecting stdin does not suffice)
-GNUNET_LOG='scalarproduct;;;;DEBUG' GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 &
+#GNUNET_LOG='scalarproduct;;;;DEBUG'
+GNUNET_TESTING_PREFIX=$PREFIX ../testbed/gnunet-testbed-profiler -n -c test_scalarproduct.conf -p 2 &
 PID=$!
 # sleep 1 is too short on most systems, 2 works on most, 5 seems to be safe
 sleep 5
@@ -24,11 +25,13 @@ sleep 5
 # get bob's peer ID, necessary for alice
 PEERIDBOB=`gnunet-peerinfo -qs $CFGBOB`
 
-GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGBOB $INPUTBOB &
-RESULT=`GNUNET_LOG=';;;;DEBUG' gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB`
+#GNUNET_LOG=';;;;DEBUG'
+gnunet-scalarproduct $CFGBOB $INPUTBOB &
+GNUNET_LOG=';;;;DEBUG'
+RESULT=`gnunet-scalarproduct $CFGALICE $INPUTALICE -p $PEERIDBOB`
 
 # terminate the testbed
-kill $PID 
+kill $PID
 
 EXPECTED="0CCC"
 if [ "$RESULT" == "$EXPECTED" ]