This allows tests to pass on systems where the readelf executable is
prefixed with a target triple.
Signed-off-by: Lucio Sauer <watermanpaint@posteo.net>
---
test/T000-basic.sh | 2 +-
test/T360-symbol-hiding.sh | 2 +-
test/test-vars.sh | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/test/T000-basic.sh b/test/T000-basic.sh
index 642f918d..774f2f5a 100755
--- a/test/T000-basic.sh
+++ b/test/T000-basic.sh
@@ -72,7 +72,7 @@ test_expect_equal \
"$(echo $PATH|cut -f1 -d: | sed -e 's,/test/valgrind/bin$,,')"
test_begin_subtest 'notmuch is compiled with debugging symbols'
-readelf --sections $(command -v notmuch) | grep \.debug
+${TEST_READELF} --sections $(command -v notmuch) | grep \.debug
test_expect_equal 0 $?
test_done
diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh
index ff06ff69..a75f7435 100755
--- a/test/T360-symbol-hiding.sh
+++ b/test/T360-symbol-hiding.sh
@@ -30,7 +30,7 @@ test_begin_subtest 'checking output'
test_expect_equal "$result" "$output"
test_begin_subtest 'comparing existing to exported symbols'
-readelf -Ws $NOTMUCH_BUILDDIR/lib/libnotmuch.so | sed -e 's/\[[^]]*\]//' |\
+${TEST_READELF} -Ws $NOTMUCH_BUILDDIR/lib/libnotmuch.so | sed -e 's/\[[^]]*\]//' |\
awk '$4 == "FUNC" && $5 == "GLOBAL" && $7 != "UND" {print $8}' | sort -u > ACTUAL
sed -n 's/^\(notmuch_[a-zA-Z0-9_]*\)[[:blank:]]*(.*/\1/p' $NOTMUCH_SRCDIR/lib/notmuch.h | sort -u > EXPORTED
test_expect_equal_file EXPORTED ACTUAL
diff --git a/test/test-vars.sh b/test/test-vars.sh
index 02d60f89..f30811a9 100644
--- a/test/test-vars.sh
+++ b/test/test-vars.sh
@@ -32,6 +32,7 @@ TEST_EMACSCLIENT=${TEST_EMACSCLIENT:-emacsclient}
TEST_GDB=${TEST_GDB:-gdb}
TEST_CC=${TEST_CC:-cc}
TEST_CFLAGS=${TEST_CFLAGS:-"-g -O0"}
+TEST_READELF=${TEST_READELF:-readelf}
TEST_SHIM_CFLAGS=${TEST_SHIM_CFLAGS:-"-fpic -shared"}
TEST_SHIM_LDFLAGS=${TEST_SHIM_LDFLAGS:-"-ldl"}
--
2.52.0
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org