From 6d66819651c1d46ac3ac0ac8da74488e760bbda8 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Mon, 26 Oct 2020 20:06:59 -0700 Subject: [PATCH] scripts/run_tests.sh: show ldd output if binary isn't dynamically linked --- scripts/run_tests.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/run_tests.sh b/scripts/run_tests.sh index 841cd3a..786ed68 100755 --- a/scripts/run_tests.sh +++ b/scripts/run_tests.sh @@ -210,9 +210,12 @@ test_use_shared_lib() { fail "Binary should be statically linked by default" fi $MAKE USE_SHARED_LIB=1 all check > /dev/null - if ! ldd gzip | grep -q 'libdeflate.so'; then + ldd gzip > "$TMPDIR/ldd.out" + if ! grep -q 'libdeflate.so' "$TMPDIR/ldd.out"; then + cat 1>&2 "$TMPDIR/ldd.out" fail "Binary isn't dynamically linked" fi + rm "$TMPDIR/ldd.out" } install_uninstall_tests() {