From c99b07fc3bf507fc31b7e454ddfda5a767972bed Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 5 Aug 2020 20:26:53 +0200 Subject: [PATCH] =?utf8?q?Don=E2=80=99t=20depend=20on=20which(1)=20to=20de?= =?utf8?q?tect=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- test/run | 2 +- test/suites/profiling.bash | 2 +- test/suites/profiling_clang.bash | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/run b/test/run index ca8e3097c..c0214659a 100755 --- a/test/run +++ b/test/run @@ -195,7 +195,7 @@ expect_different_files() { is_equal_object_files() { if $HOST_OS_LINUX && $COMPILER_TYPE_CLANG; then - if ! which eu-elfcmp >/dev/null 2>&1; then + if ! command -v eu-elfcmp >/dev/null; then test_failed "Please install elfutils to get eu-elfcmp" fi eu-elfcmp -q "$1" "$2" diff --git a/test/suites/profiling.bash b/test/suites/profiling.bash index 553f90865..e1ea00cd1 100644 --- a/test/suites/profiling.bash +++ b/test/suites/profiling.bash @@ -3,7 +3,7 @@ SUITE_profiling_PROBE() { if ! $COMPILER -fprofile-generate -c test.c 2>/dev/null; then echo "compiler does not support profiling" fi - if $COMPILER_TYPE_CLANG && ! which llvm-profdata$CLANG_VERSION_SUFFIX >/dev/null 2>/dev/null; then + if $COMPILER_TYPE_CLANG && ! command -v llvm-profdata$CLANG_VERSION_SUFFIX >/dev/null; then echo "llvm-profdata$CLANG_VERSION_SUFFIX tool not found" fi } diff --git a/test/suites/profiling_clang.bash b/test/suites/profiling_clang.bash index 039a5d943..332fbc7db 100644 --- a/test/suites/profiling_clang.bash +++ b/test/suites/profiling_clang.bash @@ -1,7 +1,7 @@ SUITE_profiling_clang_PROBE() { if ! $COMPILER_TYPE_CLANG; then echo "compiler is not Clang" - elif ! which llvm-profdata$CLANG_VERSION_SUFFIX >/dev/null 2>/dev/null; then + elif ! command -v llvm-profdata$CLANG_VERSION_SUFFIX >/dev/null; then echo "llvm-profdata$CLANG_VERSION_SUFFIX tool not found" fi } -- 2.47.3