mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 01:01:33 +00:00
test.sh: replace 'which' with 'type'
This commit is contained in:
parent
eca6bdb85d
commit
f6847b0314
16
test/test.sh
16
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user