tools/run_tests.sh: clean up freestanding_tests()

This commit is contained in:
Eric Biggers 2020-04-18 09:57:58 -07:00
parent d92c601bdc
commit 5bab66a371

View File

@ -178,15 +178,14 @@ freestanding_tests() {
test_group_included freestanding || return 0 test_group_included freestanding || return 0
WRAPPER= native_build_and_test FREESTANDING=1 WRAPPER= native_build_and_test FREESTANDING=1
if nm libdeflate.so | grep ' U ' > "$TMPFILE"; then if nm libdeflate.so | grep -q ' U '; then
echo 1>&2 "Freestanding lib links to external functions!:" echo 1>&2 "Freestanding lib links to external functions!:"
nm libdeflate.so | grep ' U ' nm libdeflate.so | grep ' U '
return 1 return 1
fi fi
ldd libdeflate.so > "$TMPFILE" if ldd libdeflate.so | grep -q -v '\<statically linked\>'; then
if grep -q -v 'statically linked' "$TMPFILE"; then
echo 1>&2 "Freestanding lib links to external libraries!:" echo 1>&2 "Freestanding lib links to external libraries!:"
cat "$TMPFILE" ldd libdeflate.so
return 1 return 1
fi fi