Skip to content

Commit

Permalink
Do not print logs when building project image
Browse files Browse the repository at this point in the history
  • Loading branch information
DonggeLiu committed Dec 11, 2024
1 parent 2f4f17e commit cff6df6
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions experiment/oss_fuzz_checkout.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,17 @@ def _build_image(project_name: str) -> str:
'python3', 'infra/helper.py', 'build_image', '--pull', project_name
]
try:
sp.run(command, cwd=OSS_FUZZ_DIR, env=adjusted_env, check=True)
sp.run(command,
cwd=OSS_FUZZ_DIR,
env=adjusted_env,
stdout=sp.PIPE,
stderr=sp.PIPE,
check=True)
logger.info('Successfully build project image for %s', project_name)
return f'gcr.io/oss-fuzz/{project_name}'
except sp.CalledProcessError:
logger.info('Failed to build project image for %s', project_name)
except sp.CalledProcessError as e:
logger.error('Failed to build project image for %s: %s', project_name,
e.stderr.decode('utf-8'))
return ''


Expand Down

0 comments on commit cff6df6

Please sign in to comment.