Skip to content

Commit

Permalink
infra: build: introspector: upload artifacts in all cases (#12609)
Browse files Browse the repository at this point in the history
Upload introspector report even when build fails. This is to ensure
artifacts from FI light is uploaded for each build.

---------

Signed-off-by: David Korczynski <[email protected]>
  • Loading branch information
DavidKorczynski authored Oct 17, 2024
1 parent 9e69541 commit 9e9ed9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion infra/build/functions/build_and_run_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,11 @@ def get_fuzz_introspector_steps( # pylint: disable=too-many-locals, too-many-ar
env.append(f'PROJECT_NAME={project.name}')

build_steps.append(
build_project.get_compile_step(project, build, env, config.parallel))
build_project.get_compile_step(project,
build,
env,
config.parallel,
allow_failure=True))

# Upload the report.
upload_report_url = bucket.get_upload_url('inspector-report')
Expand Down
9 changes: 7 additions & 2 deletions infra/build/functions/build_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,12 @@ def get_env(fuzzing_language, build):
return list(sorted([f'{key}={value}' for key, value in env_dict.items()]))


def get_compile_step(project, build, env, parallel, upload_build_logs=None):
def get_compile_step(project,
build,
env,
parallel,
upload_build_logs=None,
allow_failure=False):
"""Returns the GCB step for compiling |projects| fuzzers using |env|. The type
of build is specified by |build|."""
failure_msg = (
Expand Down Expand Up @@ -277,7 +282,7 @@ def get_compile_step(project, build, env, parallel, upload_build_logs=None):
'id': get_id('compile', build),
}

if upload_build_logs:
if upload_build_logs or allow_failure:
# The failure will be reported in a subsequent step.
compile_step['allowFailure'] = True

Expand Down

0 comments on commit 9e9ed9b

Please sign in to comment.