From b3689117b9e56db65d8d1ce3a4204b6888379bfb Mon Sep 17 00:00:00 2001 From: Mike Aizatsky Date: Tue, 11 Oct 2016 18:41:41 -0700 Subject: [PATCH] Update libfuzzer-pipeline.groovy --- infra/libfuzzer-pipeline.groovy | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/infra/libfuzzer-pipeline.groovy b/infra/libfuzzer-pipeline.groovy index 5ff6aa8df..027269c97 100644 --- a/infra/libfuzzer-pipeline.groovy +++ b/infra/libfuzzer-pipeline.groovy @@ -85,12 +85,17 @@ def call(body) { // Run each of resulting fuzzers. dir ('out') { - stage("running fuzzers") { + def resultsDir = "$workspace/test-results/" + sh "rm -rf $resultsDir" + sh "mkdir -p $resultsDir" + stage("running fuzzers", testResults: "$resultsDir/*.xml") { def fuzzersFound = 0 sh "ls -alR" for (int i = 0; i < sanitizers.size(); i++) { def sanitizer = sanitizers[i] dir (sanitizer) { + def testReport = ""; + def d = pwd() def files = findFiles() for (int j = 0; j < files.size(); j++) { @@ -103,6 +108,9 @@ def call(body) { sh "docker run -v $d:/out -t ossfuzz/libfuzzer-runner /out/$file -runs=1" fuzzersFound += 1 } + + testReport += "/>"; + writeFile("$resultsDir/$sanitizer.xml", testReport); } } echo "Tested $fuzzersFound fuzzer"