Update libfuzzer-pipeline.groovy

This commit is contained in:
Mike Aizatsky 2016-10-11 18:41:41 -07:00 committed by GitHub
parent b48d045c4a
commit b3689117b9
1 changed files with 9 additions and 1 deletions

View File

@ -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 = "<testsuite name=\"$projectName-$sanitizer\">";
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"