diff options
author | 2022-05-03 11:41:29 +0100 | |
---|---|---|
committer | 2022-05-03 20:41:29 +1000 | |
commit | 74438324f85243553bb841e88062d2debf2ff7fe (patch) | |
tree | 9805ffb6880103ab73481e383f795cfa0dd76ef3 /infra/base-images | |
parent | 400ee9cf421bb6c0537a3e454bdfb06906e04b52 (diff) |
infra: fix python coverage (#7641)
* infra: fix python coverage
The python coverage has not started working on oss-fuzz.com yet. This is
an effort to fix this.
* add logs and stats files
* log stderr too
Diffstat (limited to 'infra/base-images')
-rwxr-xr-x | infra/base-images/base-runner/coverage | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/infra/base-images/base-runner/coverage b/infra/base-images/base-runner/coverage index 9eb0e9b6..30e9920e 100755 --- a/infra/base-images/base-runner/coverage +++ b/infra/base-images/base-runner/coverage @@ -155,7 +155,11 @@ function run_python_fuzz_target { local target=$1 local zipped_sources="$DUMPS_DIR/$target.deps.zip" local corpus_real="$CORPUS_DIR/${target}" - $OUT/$target.pkg $corpus_real -atheris_runs=$(ls -la $corpus_real | wc -l) + # Write dummy stats file + echo "{}" > "$FUZZER_STATS_DIR/$target.json" + + # Run fuzzer + $OUT/$target.pkg $corpus_real -atheris_runs=$(ls -la $corpus_real | wc -l) > $LOGS_DIR/$target.log 2>&1 if (( $? != 0 )); then echo "Error happened getting coverage of $target" echo "This is likely because Atheris did not exit gracefully" @@ -308,6 +312,9 @@ elif [[ $FUZZING_LANGUAGE == "python" ]]; then python3 /usr/local/bin/python_coverage_runner_help.py combine .coverage_* python3 /usr/local/bin/python_coverage_runner_help.py html mv htmlcov/* $REPORT_PLATFORM_DIR/ + + # Create an empty summary file for now + echo "{}" >> $SUMMARY_FILE elif [[ $FUZZING_LANGUAGE == "jvm" ]]; then # From this point on the script does not tolerate any errors. |