test: Ensure fuzz tool returns 0 if libfuzzer not avail

Change-Id: Iafbeea0444529df5c14c65c0722653aba442df76
Signed-off-by: Greg Tucker <greg.b.tucker@intel.com>
This commit is contained in:
Greg Tucker 2017-11-17 18:49:07 -07:00
parent 4f59eeda90
commit 54e1f157f7

View File

@ -103,8 +103,8 @@ fi
# Optionally build llvm fuzz tests
if [ $use_llvm -ge 0 ]; then
echo Build llvm fuzz tests
if ! command -V clang++ > /dev/null &&
echo int LLVMFuzzerTestOneInput\(\)\{return 0\;\} | clang++ -x c - -lFuzzer -lpthread -o /dev/null; then
if ! ( command -V clang++ > /dev/null &&
echo int LLVMFuzzerTestOneInput\(\)\{return 0\;\} | clang++ -x c - -lFuzzer -lpthread -o /dev/null); then
echo $0 option --llvm requires clang++ and libFuzzer
exit 0
fi