about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xtest/test.sh16
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