From 8c87c5402cdea56060f9a3a1e8754fcefd4f3ae8 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Tue, 2 Jul 2019 13:42:33 +0200 Subject: [PATCH] Extract objdump_cmd to test/run where it belongs --- test/run | 10 ++++++++++ test/suites/debug_prefix_map.bash | 10 ---------- 2 files changed, 10 insertions(+), 10 deletions(-) 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\" )" -- 2.47.2