diff options
author | Leo Neat <lneat@google.com> | 2020-03-16 10:00:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-16 10:00:56 -0700 |
commit | a1c7499830dd63c0f733f65c44ebce2f9e54faf7 (patch) | |
tree | 90601924968005395f7ef6c4d389e442ba1aab52 /infra/cifuzz | |
parent | 98fac43fe2252c58a5ce4d8415924bf355e728b7 (diff) |
[CIFuzz] Logging updates (#3503)
Provide some simple logging updates to assert that affected fuzzers is running correctly.
Also prevents the clouding of longs when the reproduction script runs.
Diffstat (limited to 'infra/cifuzz')
-rw-r--r-- | infra/cifuzz/cifuzz.py | 7 | ||||
-rw-r--r-- | infra/cifuzz/fuzz_target.py | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/infra/cifuzz/cifuzz.py b/infra/cifuzz/cifuzz.py index 8c8b20f6..6d32ebd7 100644 --- a/infra/cifuzz/cifuzz.py +++ b/infra/cifuzz/cifuzz.py @@ -374,10 +374,13 @@ def remove_unaffected_fuzzers(project_name, out_dir, files_changed, logging.error('Could not download latest coverage report.') return affected_fuzzers = [] + logging.info('Files changed in PR:\n%s', '\n'.join(files_changed)) for fuzzer in fuzzer_paths: + fuzzer_name = os.path.basename(fuzzer) covered_files = get_files_covered_by_target(latest_cov_report_info, - os.path.basename(fuzzer), - src_in_docker) + fuzzer_name, src_in_docker) + logging.info('Fuzzer %s has affected files:\n%s', fuzzer_name, + '\n'.join(covered_files)) if not covered_files: # Assume a fuzzer is affected if we can't get its coverage from OSS-Fuzz. affected_fuzzers.append(os.path.basename(fuzzer)) diff --git a/infra/cifuzz/fuzz_target.py b/infra/cifuzz/fuzz_target.py index a3989b39..85fdbdc9 100644 --- a/infra/cifuzz/fuzz_target.py +++ b/infra/cifuzz/fuzz_target.py @@ -187,9 +187,8 @@ class FuzzTarget: logging.info('Running reproduce command: %s.', ' '.join(command)) for _ in range(REPRODUCE_ATTEMPTS): - out, _, err_code = utils.execute(command) + _, _, err_code = utils.execute(command) if err_code: - logging.error('Output for the reproduce command:\n%s.', out) return True return False |