diff options
author | hexcoder- <heiko@hexco.de> | 2020-03-19 00:19:25 +0100 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-03-19 00:19:25 +0100 |
commit | f6847b0314320c1799efd238295d3aa4411c3f23 (patch) | |
tree | 82466774cc1d39a35f9cb76d6d9c66ed00d2eade | |
parent | eca6bdb85d4e04ec60e77ca0592ea1d38489806f (diff) | |
download | afl++-f6847b0314320c1799efd238295d3aa4411c3f23.tar.gz |
test.sh: replace 'which' with 'type'
-rwxr-xr-x | test/test.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test.sh b/test/test.sh index 6dcf3e67..49dfb1a9 100755 --- a/test/test.sh +++ b/test/test.sh @@ -222,8 +222,8 @@ $ECHO "$BLUE[*] Testing: llvm_mode, afl-showmap, afl-fuzz, afl-cmin and afl-tmin test -e ../afl-clang-fast -a -e ../split-switches-pass.so && { # on FreeBSD need to set AFL_CC test `uname -s` = 'FreeBSD' && { - if which clang >/dev/null; then - export AFL_CC=`which clang` + if type clang >/dev/null; then + export AFL_CC=`type clang | awk '{print $NF}'` else export AFL_CC=`$LLVM_CONFIG --bindir`/clang fi @@ -400,8 +400,8 @@ $ECHO "$BLUE[*] Testing: LTO llvm_mode" test -e ../afl-clang-lto -a -e ../afl-llvm-lto-instrumentation.so && { # on FreeBSD need to set AFL_CC test `uname -s` = 'FreeBSD' && { - if which clang >/dev/null; then - export AFL_CC=`which clang` + if type clang >/dev/null; then + export AFL_CC=`type clang | awk '{print $NF}'` else export AFL_CC=`$LLVM_CONFIG --bindir`/clang fi @@ -471,7 +471,7 @@ test -e ../afl-clang-lto -a -e ../afl-llvm-lto-instrumentation.so && { } $ECHO "$BLUE[*] Testing: gcc_plugin" -export AFL_CC=`which gcc` +export AFL_CC=`type gcc | awk '{print $NF}'` test -e ../afl-gcc-fast -a -e ../afl-gcc-rt.o && { ../afl-gcc-fast -o test-instr.plain.gccpi ../test-instr.c > /dev/null 2>&1 AFL_HARDEN=1 ../afl-gcc-fast -o test-compcov.harden.gccpi test-compcov.c > /dev/null 2>&1 @@ -616,8 +616,8 @@ test -e ../libradamsa.so && { # on FreeBSD need to set AFL_CC test `uname -s` = 'FreeBSD' && { - if which clang >/dev/null; then - export AFL_CC=`which clang` + if type clang >/dev/null; then + export AFL_CC=`type clang | awk '{print $NF}'` else export AFL_CC=`$LLVM_CONFIG --bindir`/clang fi @@ -835,7 +835,7 @@ test -d ../unicorn_mode/unicornafl && { test -e ../unicorn_mode/samples/simple/simple_target.bin -a -e ../unicorn_mode/samples/compcov_x64/compcov_target.bin && { { # travis workaround - PY=`which python` + PY=`type python | awk '{print $NF}'` test "$PY" = "/opt/pyenv/shims/python" -a -x /usr/bin/python && PY=/usr/bin/python mkdir -p in echo 0 > in/in |