From 0ed0f37ca23cf1c15503879e7b4b18aa1ce93fda Mon Sep 17 00:00:00 2001 From: Leo Neat Date: Tue, 11 Feb 2020 08:42:10 -0800 Subject: [CIFuzz] Change 'bug_report' directory to 'artifacts'. (#3369) --- infra/cifuzz/actions/run_fuzzers/run_fuzzers_entrypoint.py | 2 +- infra/cifuzz/cifuzz.py | 8 ++++---- infra/cifuzz/example_main.yml | 10 +++------- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/infra/cifuzz/actions/run_fuzzers/run_fuzzers_entrypoint.py b/infra/cifuzz/actions/run_fuzzers/run_fuzzers_entrypoint.py index ab18c156..70a32f30 100644 --- a/infra/cifuzz/actions/run_fuzzers/run_fuzzers_entrypoint.py +++ b/infra/cifuzz/actions/run_fuzzers/run_fuzzers_entrypoint.py @@ -63,7 +63,7 @@ def main(): # If the file does not exist, the action will crash attempting to upload it. # The dry run needs this file because it is set to upload a test case both # on successful runs and on failures. - out_dir = os.path.join(workspace, 'out', 'bug_report') + out_dir = os.path.join(workspace, 'out', 'artifacts') os.makedirs(out_dir, exist_ok=True) # Sets the default return code on error to success. diff --git a/infra/cifuzz/cifuzz.py b/infra/cifuzz/cifuzz.py index 17e627d4..ab7b2cfe 100644 --- a/infra/cifuzz/cifuzz.py +++ b/infra/cifuzz/cifuzz.py @@ -170,8 +170,8 @@ def run_fuzzers(fuzz_seconds, workspace): logging.error('Invalid workspace: %s.', workspace) return False, False out_dir = os.path.join(workspace, 'out') - bug_report_dir = os.path.join(out_dir, 'bug_report') - os.makedirs(bug_report_dir, exist_ok=True) + artifacts_dir = os.path.join(out_dir, 'artifacts') + os.makedirs(artifacts_dir, exist_ok=True) if not fuzz_seconds or fuzz_seconds < 1: logging.error('Fuzz_seconds argument must be greater than 1, but was: %s.', format(fuzz_seconds)) @@ -195,8 +195,8 @@ def run_fuzzers(fuzz_seconds, workspace): else: logging.info('Fuzzer %s, detected error: %s.', target.target_name, stack_trace) - shutil.move(test_case, os.path.join(bug_report_dir, 'test_case')) - parse_fuzzer_output(stack_trace, bug_report_dir) + shutil.move(test_case, os.path.join(artifacts_dir, 'test_case')) + parse_fuzzer_output(stack_trace, artifacts_dir) return True, True return True, False diff --git a/infra/cifuzz/example_main.yml b/infra/cifuzz/example_main.yml index 576c84a2..588dde82 100644 --- a/infra/cifuzz/example_main.yml +++ b/infra/cifuzz/example_main.yml @@ -1,12 +1,8 @@ name: CIFuzz - -on: [push] - +on: [pull_request] jobs: Fuzzing: - runs-on: ubuntu-latest - steps: - name: Build Fuzzers uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master @@ -22,5 +18,5 @@ jobs: uses: actions/upload-artifact@v1 if: failure() with: - name: fuzzer_testcase - path: ./out/testcase + name: artifacts + path: ./out/artifacts -- cgit v1.2.3