From: Joel Rosdahl Date: Tue, 2 Jul 2019 11:42:33 +0000 (+0200) Subject: Extract objdump_cmd to test/run where it belongs X-Git-Tag: v4.0~915 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=8c87c5402cdea56060f9a3a1e8754fcefd4f3ae8;p=thirdparty%2Fccache.git Extract objdump_cmd to test/run where it belongs --- diff --git a/test/run b/test/run index f4f501fea..2a1a03a9b 100755 --- a/test/run +++ b/test/run @@ -110,6 +110,16 @@ file_size() { wc -c $1 | awk '{print $1}' } +objdump_cmd() { + if $HOST_OS_APPLE; then + xcrun dwarfdump -r0 $1 + elif $HOST_OS_FREEBSD; then + objdump -W $1 + else + objdump -g $1 + fi +} + expect_stat() { local stat="$1" local expected_value="$2" diff --git a/test/suites/debug_prefix_map.bash b/test/suites/debug_prefix_map.bash index d00e65476..b68cf462a 100644 --- a/test/suites/debug_prefix_map.bash +++ b/test/suites/debug_prefix_map.bash @@ -20,16 +20,6 @@ EOF backdate dir1/include/test.h dir2/include/test.h } -objdump_cmd() { - if $HOST_OS_APPLE; then - xcrun dwarfdump -r0 $1 - elif $HOST_OS_FREEBSD; then - objdump -W $1 - else - objdump -g $1 - fi -} - grep_cmd() { if $HOST_OS_APPLE; then grep "( \"$1\" )"