Skip dlopen demo in static builds

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine 2023-07-25 20:13:53 +02:00
parent c25ae6f48c
commit f5d2d1c7cd

View file

@ -25,6 +25,14 @@ msg "Test the dynamic loading of libmbed*"
program="$programs_dir/test/dlopen" program="$programs_dir/test/dlopen"
library_dir="$root_dir/library" library_dir="$root_dir/library"
# Skip this test if we don't have a shared library build. Detect this
# through the absence of the demo program.
if [ ! -e "$program" ]; then
msg "$0: this demo requires a shared library build."
# Exit with a success status so that this counts as a pass for run_demos.py.
exit
fi
# ELF-based Unix-like (Linux, *BSD, Solaris, ...) # ELF-based Unix-like (Linux, *BSD, Solaris, ...)
if [ -n "${LD_LIBRARY_PATH-}" ]; then if [ -n "${LD_LIBRARY_PATH-}" ]; then
LD_LIBRARY_PATH="$library_dir:$LD_LIBRARY_PATH" LD_LIBRARY_PATH="$library_dir:$LD_LIBRARY_PATH"