aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-10-17 20:13:50 +0000
committerChristian Grothoff <christian@grothoff.org>2009-10-17 20:13:50 +0000
commit3c913c6ad5bb2461a01b3745b0350df7d4ac9a78 (patch)
tree848c0963403fc709fd445f06238651c73e391988 /src
parent1ac43673e8ea717d15480787dec2c0e1c305a2d6 (diff)
downloadgnunet-3c913c6ad5bb2461a01b3745b0350df7d4ac9a78.tar.gz
gnunet-3c913c6ad5bb2461a01b3745b0350df7d4ac9a78.zip
fix
Diffstat (limited to 'src')
-rwxr-xr-xsrc/arm/test_gnunet_arm.sh22
1 files 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 @@
1#!/bin/sh 1#!/bin/sh
2 2
3rm -rf /tmp/test-gnunetd-arm/
4exe="./gnunet-arm -c test_arm_api_data.conf" 3exe="./gnunet-arm -c test_arm_api_data.conf"
5base=/tmp/gnunet-test-arm
6out=`mktemp /tmp/test-gnunetd-arm-logXXXXXXXX` 4out=`mktemp /tmp/test-gnunetd-arm-logXXXXXXXX`
7#DEBUG="-L DEBUG" 5#DEBUG="-L DEBUG"
8 6
@@ -43,21 +41,21 @@ echo "PASS"
43 41
44# ---------------------------------------------------------------------------------- 42# ----------------------------------------------------------------------------------
45echo -n "TEST: Test -t on running service... " 43echo -n "TEST: Test -t on running service... "
46if ! $exe $DEBUG -t resolver > $base.out; then 44if ! $exe $DEBUG -t resolver > $out; then
47 echo "FAIL: error running $exe" 45 echo "FAIL: error running $exe"
48 exit 1 46 exit 1
49fi 47fi
50LINES=`cat $base.out | grep resolver | grep not | wc -l` 48LINES=`cat $out | grep resolver | grep not | wc -l`
51if test $LINES -ne 0; then 49if test $LINES -ne 0; then
52 echo "FAIL: unexpected output:" 50 echo "FAIL: unexpected output:"
53 cat $base.out 51 cat $out
54 $exe -e 52 $exe -e
55 exit 1 53 exit 1
56fi 54fi
57LINES=`cat $base.out | grep resolver | grep -v not | wc -l` 55LINES=`cat $out | grep resolver | grep -v not | wc -l`
58if test $LINES -ne 1; then 56if test $LINES -ne 1; then
59 echo "FAIL: unexpected output" 57 echo "FAIL: unexpected output"
60 cat $base.out 58 cat $out
61 $exe -e 59 $exe -e
62 exit 1 60 exit 1
63fi 61fi
@@ -76,16 +74,16 @@ echo "PASS"
76 74
77# ---------------------------------------------------------------------------------- 75# ----------------------------------------------------------------------------------
78echo -n "TEST: Test -t on stopped service... " 76echo -n "TEST: Test -t on stopped service... "
79if ! $exe $DEBUG -t resolver > $base.out; then 77if ! $exe $DEBUG -t resolver > $out; then
80 echo "FAIL: error running $exe" 78 echo "FAIL: error running $exe"
81 cat $base.out 79 cat $out
82 $exe -e > /dev/null 80 $exe -e > /dev/null
83 exit 1 81 exit 1
84fi 82fi
85LINES=`cat $base.out | grep resolver | grep not | wc -l` 83LINES=`cat $out | grep resolver | grep not | wc -l`
86if test $LINES -ne 1; then 84if test $LINES -ne 1; then
87 echo "FAIL: unexpected output" 85 echo "FAIL: unexpected output"
88 cat $base.out 86 cat $out
89 $exe -e > /dev/null 87 $exe -e > /dev/null
90 exit 1 88 exit 1
91fi 89fi
@@ -102,5 +100,5 @@ sleep 1
102echo "PASS" 100echo "PASS"
103 101
104rm -rf /tmp/test-gnunetd-arm/ 102rm -rf /tmp/test-gnunetd-arm/
105rm -f $base.out "$out" 103rm -f $out
106 104