Skip to content

Commit 370da40

Browse files
authored
Catch the error in preparing OSS-Fuzz for benchmark generation. (#94)
Seeing this error occurred on some projects when generating benchmarks. Log the project name for this error in case this happens again so that we can re-generate the benchmark.yaml for that project.
1 parent 9885ae1 commit 370da40

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

data_prep/introspector.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,12 @@ def get_project_funcs(project_name: str) -> Dict[str, List[Dict]]:
351351
else:
352352
outdir = ''
353353

354-
oss_fuzz_checkout.clone_oss_fuzz()
355-
oss_fuzz_checkout.postprocess_oss_fuzz()
354+
try:
355+
oss_fuzz_checkout.clone_oss_fuzz()
356+
oss_fuzz_checkout.postprocess_oss_fuzz()
357+
except subprocess.CalledProcessError as e:
358+
logging.error('Failed to prepare OSS-Fuzz directory for project %s: %s',
359+
sys.argv[1], e)
356360
cur_project_language = oss_fuzz_checkout.get_project_language(cur_project)
357361
benchmarks = populate_benchmarks_using_introspector(cur_project,
358362
cur_project_language,

0 commit comments

Comments
 (0)