Files
libfaketime/test/test_constructors.sh
Daniel Kahn Gillmor 17522c5ba1 Overhaul testing library constructors
We want to make it easier to test a bunch of different functions that
might be invoked in constructors of other libraries.

It seems conceivable that with these snippets, we could design other
tests that also work across a wide range of intercepted functions.
2021-02-25 23:17:25 -05:00

11 lines
311 B
Bash
Executable File

#!/bin/sh
FTPL="${FAKETIME_TESTLIB:-../src/libfaketime.so.1}"
function="$1"
printf 'Testing library init for %s (no LD_PRELOAD)\n' "$function"
LD_LIBRARY_PATH=. "./use_lib_$function"
printf 'Testing library init for %s (LD_PRELOAD)\n' "$function"
LD_LIBRARY_PATH=. LD_PRELOAD="$FTPL" "./use_lib_$function"