The output of `objdump -t` depends on the format of the object files which are different across platforms (e.g. Mac OS X). Since we really just want to filter the symbols in the object file, nm is a more appropriate tool since it only lists symbols from object files (nm(1)) and has a consistent output format.
Signed-off-by: Charles Celerier <cceleri at cs.stanford.edu> --- test/T360-symbol-hiding.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh index 97c734a..c5bbf27 100755 --- a/test/T360-symbol-hiding.sh +++ b/test/T360-symbol-hiding.sh @@ -33,7 +33,8 @@ test_begin_subtest 'checking output' test_expect_equal "$result" "$output" test_begin_subtest 'comparing existing to exported symbols' -objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL + +nm -g $TEST_DIRECTORY/../lib/*.o | sed -n 's/.*\s\+T\s\+_\(notmuch_.*\)/\1/p' | sort | uniq > ACTUAL sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED test_expect_equal_file EXPORTED ACTUAL -- 1.8.5.2 (Apple Git-48)