diff options
Diffstat (limited to 'test/functests/common.inc')
-rw-r--r-- | test/functests/common.inc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functests/common.inc b/test/functests/common.inc index d184ae2..3d9be16 100644 --- a/test/functests/common.inc +++ b/test/functests/common.inc @@ -1,5 +1,8 @@ # libfaketime-specific common support routines for tests +LIB_BUILD_PATH="../src/$(grep 'LT_OBJDIR' ../config.h | cut -d'"' -f2)" +LIBFAKETIME_LA=$(find "$LIB_BUILD_PATH" | grep 'libfaketime\.\(dylib\|so\)$') + # say which *_fakecmd wrapper to use platform() { @@ -19,7 +22,7 @@ platform() mac_fakecmd() { typeset timestring="$1"; shift - typeset fakelib=../src/libfaketime.1.dylib + typeset fakelib="$LIBFAKETIME_LA" export DYLD_INSERT_LIBRARIES=$fakelib export DYLD_FORCE_FLAT_NAMESPACE=1 FAKETIME="$timestring" \ @@ -29,7 +32,7 @@ mac_fakecmd() sunos_fakecmd() { typeset timestring="$1"; shift - typeset fakelib=../src/libfaketime.so.1 + typeset fakelib="$LIBFAKETIME_LA" export LD_PRELOAD=$fakelib FAKETIME="$timestring" \ "$@" @@ -39,7 +42,7 @@ sunos_fakecmd() linuxlike_fakecmd() { typeset timestring="$1"; shift - typeset fakelib=../src/libfaketime.so.1 + typeset fakelib="$LIBFAKETIME_LA" export LD_PRELOAD=$fakelib FAKETIME="$timestring" \ "$@" |