Make tests/*.sh runnable from anywhere
diff --git a/tests/compat.sh b/tests/compat.sh
index cd55d05..554adef 100755
--- a/tests/compat.sh
+++ b/tests/compat.sh
@@ -955,6 +955,11 @@
# 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 ebe1cec..63c0a23 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -342,6 +342,11 @@
# 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