From 751286be390bcfa0dae1b56ae1eb81732e2b09b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Tue, 10 Mar 2015 13:41:04 +0000 Subject: [PATCH] Make tests/*.sh runnable from anywhere --- tests/compat.sh | 5 +++++ tests/ssl-opt.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/compat.sh b/tests/compat.sh index cd55d0539..554adeffb 100755 --- a/tests/compat.sh +++ b/tests/compat.sh @@ -955,6 +955,11 @@ run_client() { # MAIN # +if cd $( dirname $0 ); then :; else + echo "cd $( dirname $0 ) failed" >&2 + exit 1 +fi + get_options "$@" # sanity checks, avoid an avalanche of errors diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index ebe1cec21..63c0a2332 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -342,6 +342,11 @@ cleanup() { # MAIN # +if cd $( dirname $0 ); then :; else + echo "cd $( dirname $0 ) failed" >&2 + exit 1 +fi + get_options "$@" # sanity checks, avoid an avalanche of errors