From 3c913c6ad5bb2461a01b3745b0350df7d4ac9a78 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 17 Oct 2009 20:13:50 +0000 Subject: [PATCH] fix --- src/arm/test_gnunet_arm.sh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/arm/test_gnunet_arm.sh b/src/arm/test_gnunet_arm.sh index d5facf447..ce4396cfb 100755 --- a/src/arm/test_gnunet_arm.sh +++ b/src/arm/test_gnunet_arm.sh @@ -1,8 +1,6 @@ #!/bin/sh -rm -rf /tmp/test-gnunetd-arm/ exe="./gnunet-arm -c test_arm_api_data.conf" -base=/tmp/gnunet-test-arm out=`mktemp /tmp/test-gnunetd-arm-logXXXXXXXX` #DEBUG="-L DEBUG" @@ -43,21 +41,21 @@ echo "PASS" # ---------------------------------------------------------------------------------- echo -n "TEST: Test -t on running service... " -if ! $exe $DEBUG -t resolver > $base.out; then +if ! $exe $DEBUG -t resolver > $out; then echo "FAIL: error running $exe" exit 1 fi -LINES=`cat $base.out | grep resolver | grep not | wc -l` +LINES=`cat $out | grep resolver | grep not | wc -l` if test $LINES -ne 0; then echo "FAIL: unexpected output:" - cat $base.out + cat $out $exe -e exit 1 fi -LINES=`cat $base.out | grep resolver | grep -v not | wc -l` +LINES=`cat $out | grep resolver | grep -v not | wc -l` if test $LINES -ne 1; then echo "FAIL: unexpected output" - cat $base.out + cat $out $exe -e exit 1 fi @@ -76,16 +74,16 @@ echo "PASS" # ---------------------------------------------------------------------------------- echo -n "TEST: Test -t on stopped service... " -if ! $exe $DEBUG -t resolver > $base.out; then +if ! $exe $DEBUG -t resolver > $out; then echo "FAIL: error running $exe" - cat $base.out + cat $out $exe -e > /dev/null exit 1 fi -LINES=`cat $base.out | grep resolver | grep not | wc -l` +LINES=`cat $out | grep resolver | grep not | wc -l` if test $LINES -ne 1; then echo "FAIL: unexpected output" - cat $base.out + cat $out $exe -e > /dev/null exit 1 fi @@ -102,5 +100,5 @@ sleep 1 echo "PASS" rm -rf /tmp/test-gnunetd-arm/ -rm -f $base.out "$out" +rm -f $out -- 2.25.1