Skip to content

Commit a03f921

Browse files
Support postprocessing in OSS-Fuzz (#4388)
1 parent 1cdcf32 commit a03f921

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/clusterfuzz/_internal/base/tasks/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,8 @@ def is_done_collecting_messages():
281281
def get_postprocess_task():
282282
"""Gets a postprocess task if one exists."""
283283
# This should only be run on non-preemptible bots.
284-
if not task_utils.is_remotely_executing_utasks():
284+
if not (task_utils.is_remotely_executing_utasks() or
285+
task_utils.get_opted_in_tasks()):
285286
return None
286287
# Postprocess is platform-agnostic, so we run all such tasks on our
287288
# most generic and plentiful bots only. In other words, we avoid

src/clusterfuzz/_internal/base/tasks/task_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,16 @@ def is_remotely_executing_utasks(task=None) -> bool:
3737
return is_task_opted_into_uworker_execution(task)
3838

3939

40+
def get_opted_in_tasks():
41+
return local_config.ProjectConfig().get('uworker_tasks', [])
42+
43+
4044
def is_task_opted_into_uworker_execution(task):
4145
# TODO(metzman): Remove this after OSS-Fuzz and Chrome are at parity.
42-
uworker_tasks = local_config.ProjectConfig().get('uworker_tasks', [])
4346
if 'skia' not in environment.get_value('JOB_NAME', ''):
4447
# This is just for testing OSS-Fuzz.
4548
return False
49+
uworker_tasks = get_opted_in_tasks()
4650
return task in uworker_tasks
4751

4852

0 commit comments

Comments
 (0)