diff --git a/infra/base-images/base-libfuzzer/test b/infra/base-images/base-libfuzzer/test index ffc43dc73..655eeb2b7 100755 --- a/infra/base-images/base-libfuzzer/test +++ b/infra/base-images/base-libfuzzer/test @@ -22,25 +22,28 @@ compile REPORT_DIR="/junit_reports" mkdir -p $REPORT_DIR -REPORT_TEXT=$(cat <<-EOF + +DIR="/out" +N=0 +for FUZZER_BINARY in $(find $DIR -executable -type f); do + echo "testing $FUZZER_BINARY" + out=$(tempfile) + $FUZZER_BINARY -runs=32 | tee $out + N=$[$N+1] + + cat $out + FUZZER=$(basename $FUZZER_BINARY) + REPORT_TEXT=$(cat <<-EOF - + - + EOF ) - -DIR="/out" -N=0 -for FUZZER in $(find $DIR -executable -type f); do - echo "testing $FUZZER" - $FUZZER -runs=32 - N=$[$N+1] - - echo $REPORT_TEXT > /junit_reports/$(basename $FUZZER).xml + echo $REPORT_TEXT > /junit_reports/$FUZZER.xml done if [ "$N" -eq "0" ]; then @@ -51,5 +54,3 @@ fi echo "$N fuzzers total" -ls -al /junit_reports/ -