Home | History | Annotate | Line # | Download | only in ci
      1 #!/bin/bash -eu
      2 
      3 #
      4 # This script runs the continuous fuzzing tests on OSS-Fuzz.
      5 #
      6 
      7 if [[ ${SANITIZER} = *undefined* ]]; then
      8   CXXFLAGS="${CXXFLAGS} -fsanitize=unsigned-integer-overflow -fsanitize-trap=unsigned-integer-overflow"
      9 fi
     10 
     11 for test in libcxx/test/libcxx/fuzzing/*.pass.cpp; do
     12     exe="$(basename ${test})"
     13     exe="${exe%.pass.cpp}"
     14     ${CXX} ${CXXFLAGS} \
     15         -std=c++14 \
     16         -DLIBCPP_OSS_FUZZ \
     17         -D_LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS \
     18         -nostdinc++ -cxx-isystem libcxx/include \
     19         -lpthread -ldl \
     20         -o "${OUT}/${exe}" \
     21         ${test} \
     22         ${LIB_FUZZING_ENGINE}
     23 done
     24