diff options
author | Richard Levitte <levitte@openssl.org> | 2018-03-14 17:25:37 +0100 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2018-03-19 07:08:51 +0100 |
commit | b4d46ad27078fa71bbc7270b667a7764d87d6f0f (patch) | |
tree | 19da735a760fe1f3ad9456775ae7fa889adbb046 /util/shlib_wrap.sh.in | |
parent | NOTES.WIN: classify targets to "native" and "hosted" and restructure. (diff) | |
download | openssl-b4d46ad27078fa71bbc7270b667a7764d87d6f0f.tar.xz openssl-b4d46ad27078fa71bbc7270b667a7764d87d6f0f.zip |
Add a simple method to run regression tests
This is only useful when building shared libraries. This allows us to
run our tests against newer libraries when the time comes. Simply do
this:
OPENSSL_REGRESSION=/other/OpenSSL/build/tree make test
($OPENSSL_REGRESSION *must* be an absolute path)
Reviewed-by: Andy Polyakov <appro@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5619)
Diffstat (limited to 'util/shlib_wrap.sh.in')
-rwxr-xr-x | util/shlib_wrap.sh.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/util/shlib_wrap.sh.in b/util/shlib_wrap.sh.in index 27a1e513c8..6c115ba725 100755 --- a/util/shlib_wrap.sh.in +++ b/util/shlib_wrap.sh.in @@ -1,5 +1,25 @@ #!/bin/sh +# To test this OpenSSL version's applications against another version's +# shared libraries, simply set +# +# OPENSSL_REGRESSION=/path/to/other/OpenSSL/build/tree +if [ -n "$OPENSSL_REGRESSION" ]; then + shlibwrap="$OPENSSL_REGRESSION/util/shlib_wrap.sh" + if [ -x "$shlibwrap" ]; then + # We clear OPENSSL_REGRESSION to avoid a loop, should the shlib_wrap.sh + # we exec also support that mechanism... + OPENSSL_REGRESSION= exec "$shlibwrap" "$@" + else + if [ -f "$shlibwrap" ]; then + echo "Not permitted to run $shlibwrap" >&2 + else + echo "No $shlibwrap, perhaps OPENSSL_REGRESSION isn't properly set?" >&2 + fi + exit 1 + fi +fi + [ $# -ne 0 ] || set -x # debug mode without arguments:-) THERE="`echo $0 | sed -e 's|[^/]*$||' 2>/dev/null`.." |