diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-10-17 20:13:50 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-10-17 20:13:50 +0000 |
commit | 3c913c6ad5bb2461a01b3745b0350df7d4ac9a78 (patch) | |
tree | 848c0963403fc709fd445f06238651c73e391988 /src | |
parent | 1ac43673e8ea717d15480787dec2c0e1c305a2d6 (diff) | |
download | gnunet-3c913c6ad5bb2461a01b3745b0350df7d4ac9a78.tar.gz gnunet-3c913c6ad5bb2461a01b3745b0350df7d4ac9a78.zip |
fix
Diffstat (limited to 'src')
-rwxr-xr-x | src/arm/test_gnunet_arm.sh | 22 |
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 | ||
3 | rm -rf /tmp/test-gnunetd-arm/ | ||
4 | exe="./gnunet-arm -c test_arm_api_data.conf" | 3 | exe="./gnunet-arm -c test_arm_api_data.conf" |
5 | base=/tmp/gnunet-test-arm | ||
6 | out=`mktemp /tmp/test-gnunetd-arm-logXXXXXXXX` | 4 | out=`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 | # ---------------------------------------------------------------------------------- |
45 | echo -n "TEST: Test -t on running service... " | 43 | echo -n "TEST: Test -t on running service... " |
46 | if ! $exe $DEBUG -t resolver > $base.out; then | 44 | if ! $exe $DEBUG -t resolver > $out; then |
47 | echo "FAIL: error running $exe" | 45 | echo "FAIL: error running $exe" |
48 | exit 1 | 46 | exit 1 |
49 | fi | 47 | fi |
50 | LINES=`cat $base.out | grep resolver | grep not | wc -l` | 48 | LINES=`cat $out | grep resolver | grep not | wc -l` |
51 | if test $LINES -ne 0; then | 49 | if 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 |
56 | fi | 54 | fi |
57 | LINES=`cat $base.out | grep resolver | grep -v not | wc -l` | 55 | LINES=`cat $out | grep resolver | grep -v not | wc -l` |
58 | if test $LINES -ne 1; then | 56 | if 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 |
63 | fi | 61 | fi |
@@ -76,16 +74,16 @@ echo "PASS" | |||
76 | 74 | ||
77 | # ---------------------------------------------------------------------------------- | 75 | # ---------------------------------------------------------------------------------- |
78 | echo -n "TEST: Test -t on stopped service... " | 76 | echo -n "TEST: Test -t on stopped service... " |
79 | if ! $exe $DEBUG -t resolver > $base.out; then | 77 | if ! $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 |
84 | fi | 82 | fi |
85 | LINES=`cat $base.out | grep resolver | grep not | wc -l` | 83 | LINES=`cat $out | grep resolver | grep not | wc -l` |
86 | if test $LINES -ne 1; then | 84 | if 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 |
91 | fi | 89 | fi |
@@ -102,5 +100,5 @@ sleep 1 | |||
102 | echo "PASS" | 100 | echo "PASS" |
103 | 101 | ||
104 | rm -rf /tmp/test-gnunetd-arm/ | 102 | rm -rf /tmp/test-gnunetd-arm/ |
105 | rm -f $base.out "$out" | 103 | rm -f $out |
106 | 104 | ||