diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-08-06 11:27:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-08-19 13:36:50 -0400 |
commit | 4ce0b7e9163e255f2d71fb7111f032ca25acf22a (patch) | |
tree | f1239ee99615a848ff8ffc039d743e921c3acf8b /src/test/test_keygen.sh | |
parent | 8f6f1544c900ec12d0dd2710a7daf13713f063d4 (diff) | |
download | tor-4ce0b7e9163e255f2d71fb7111f032ca25acf22a.tar.gz tor-4ce0b7e9163e255f2d71fb7111f032ca25acf22a.zip |
Integreate test_keygen.sh into 'make check'.
Diffstat (limited to 'src/test/test_keygen.sh')
-rwxr-xr-x | src/test/test_keygen.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/test/test_keygen.sh b/src/test/test_keygen.sh index 469b0bad32..1f1cef5f02 100755 --- a/src/test/test_keygen.sh +++ b/src/test/test_keygen.sh @@ -7,11 +7,20 @@ umask 077 set -e if [ $# -eq 0 ] || [ ! -f ${1} ] || [ ! -x ${1} ]; then - echo "Usage: ${0} PATH_TO_TOR [case-number]" - exit 1 -elif [ $# -ge 1 ]; then + if [ "$TESTING_TOR_BINARY" = ""] ; then + echo "Usage: ${0} PATH_TO_TOR [case-number]" + exit 1 + fi +fi + +if [ $# -ge 1 ]; then TOR_BINARY="${1}" shift +else + TOR_BINARY="${TESTING_TOR_BINARY}" +fi + + if [ $# -ge 1 ]; then dflt=0 @@ -35,7 +44,7 @@ elif [ $# -ge 1 ]; then if [ $# -ge 1 ]; then eval "CASE${1}"=1 fi -fi + die() { echo "$1" >&2 ; exit 5; } check_dir() { [ -d "$1" ] || die "$1 did not exist"; } |