From 916e155609bb5b803a04842835c6c08d17f87ce7 Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Thu, 27 Oct 2016 14:14:51 -0700 Subject: [PATCH] improving junit report a bit --- infra/base-images/base-libfuzzer/test | 29 ++++++++++++++------------- 1 file changed, 15 insertions(+), 14 deletions(-) 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/ -