diff options
author | hexcoder- <heiko@hexco.de> | 2020-04-22 08:02:46 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-04-22 08:02:46 +0200 |
commit | dcba2c36421315be1cca78c9ca78a2e15311cdef (patch) | |
tree | 2d534bcfd30d5a29e18adefcf6349b4d066faff5 | |
parent | 059c9634674ab3912fede3f2e0f0627a8d7d54ab (diff) | |
download | afl++-dcba2c36421315be1cca78c9ca78a2e15311cdef.tar.gz |
test.sh: custom mutator test; make it compilable with available instrumenting
compiler
-rwxr-xr-x | test/test.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/test.sh b/test/test.sh index 5af35ec3..b8d4208f 100755 --- a/test/test.sh +++ b/test/test.sh @@ -951,7 +951,15 @@ test "1" = "`../afl-fuzz | grep -i 'without python' >/dev/null; echo $?`" && { test -e test-custom-mutator.c -a -e ${CUSTOM_MUTATOR_PATH}/example.c -a -e ${CUSTOM_MUTATOR_PATH}/example.py && { unset AFL_CC # Compile the vulnerable program - ../afl-clang-fast -o test-custom-mutator test-custom-mutator.c > /dev/null 2>&1 + test -e ../afl-clang-fast && { + ../afl-clang-fast -o test-custom-mutator test-custom-mutator.c > /dev/null 2>&1 + } || { + test -e ../afl-gcc-fast && { + ../afl-gcc-fast -o test-custom-mutator test-custom-mutator.c > /dev/null 2>&1 + } || { + ../afl-gcc -o test-custom-mutator test-custom-mutator.c > /dev/null 2>&1 + } + } # Compile the custom mutator make -C ../examples/custom_mutators libexamplemutator.so > /dev/null 2>&1 test -e test-custom-mutator -a -e ${CUSTOM_MUTATOR_PATH}/libexamplemutator.so && { |