diff options
author | ng0 <ng0@n0.is> | 2019-03-15 13:46:47 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-03-15 13:46:47 +0000 |
commit | c0332990f92efcb9569fcb809484f9774eea3a14 (patch) | |
tree | edf425bde1b6b43715175fba8bc50811a22e2510 | |
parent | 29953dcd965d8b2a6fe2e0d9220bc0066005ffa5 (diff) | |
download | gnunet-c0332990f92efcb9569fcb809484f9774eea3a14.tar.gz gnunet-c0332990f92efcb9569fcb809484f9774eea3a14.zip |
test_gnunet_gns: Fix test
-rwxr-xr-x | src/gns/test_gnunet_gns.sh | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/gns/test_gnunet_gns.sh b/src/gns/test_gnunet_gns.sh index 7e0b4b5c5..74c49c537 100755 --- a/src/gns/test_gnunet_gns.sh +++ b/src/gns/test_gnunet_gns.sh | |||
@@ -1,15 +1,25 @@ | |||
1 | #!/bin/sh | 1 | #!/bin/sh |
2 | # This file is in the public domain. | 2 | # This file is in the public domain. |
3 | LOCATION=$(which gnunet-config) | 3 | # test -z being correct was a false assumption here. |
4 | if [ -z $LOCATION ] | 4 | # I have no executable 'fooble', but this will |
5 | then | 5 | # return 1: |
6 | LOCATION="gnunet-config" | 6 | # if test -z "`which fooble`"; then echo 1; fi |
7 | # The command builtin might not work with busybox's ash | ||
8 | # but this works for now. | ||
9 | existence() | ||
10 | { | ||
11 | command -v "$1" >/dev/null 2>&1 | ||
12 | } | ||
13 | |||
14 | LOCATION=`existence gnunet-config` | ||
15 | if test -z $LOCATION; then | ||
16 | LOCATION="gnunet-config" | ||
7 | fi | 17 | fi |
8 | $LOCATION --version | 18 | $LOCATION --version |
9 | if test $? != 0 | 19 | if test $? != 0 |
10 | then | 20 | then |
11 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" | 21 | echo "GNUnet command line tools cannot be found, check environmental variables PATH and GNUNET_PREFIX" |
12 | exit 77 | 22 | exit 77 |
13 | fi | 23 | fi |
14 | 24 | ||
15 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT | 25 | trap "gnunet-arm -e -c test_gns_lookup.conf" SIGINT |