@@ -450,6 +450,50 @@ def filter(task):
450450 return [l for l in filtered_for_project if filter (full_task_graph [l ])]
451451
452452
453+ @register_target_task ("enterprise_firefox_tasks" )
454+ def target_tasks_enterprise_firefox (full_task_graph , parameters , graph_config ):
455+ """In addition to doing the filtering by project that the 'default'
456+ filter does, also remove any tests running against regular (aka not shippable,
457+ asan, etc.) opt builds."""
458+ filtered_for_project = target_tasks_default (
459+ full_task_graph , parameters , graph_config
460+ )
461+
462+ def filter (task ):
463+ # Only keep builds that have been explicitely flagged
464+ if task .kind == "build" and "all" in task .attributes .get ("run_on_projects" ):
465+ return False
466+
467+ if task .kind not in TEST_KINDS :
468+ return True
469+
470+ build_platform = task .attributes .get ("build_platform" )
471+ build_type = task .attributes .get ("build_type" )
472+ shippable = task .attributes .get ("shippable" , False )
473+
474+ if not build_platform or not build_type :
475+ return True
476+
477+ family = platform_family (build_platform )
478+ # We need to know whether this test is against a "regular" opt build
479+ # (which is to say, not shippable, asan, tsan, or any other opt build
480+ # with other properties). There's no positive test for this, so we have to
481+ # do it somewhat hackily. Android doesn't have variants other than shippable
482+ # so it is pretty straightforward to check for. Other platforms have many
483+ # variants, but none of the regular opt builds we're looking for have a "-"
484+ # in their platform name, so this works (for now).
485+ is_regular_opt = (
486+ family == "android" and not shippable
487+ ) or "-" not in build_platform
488+
489+ if build_type != "opt" or not is_regular_opt :
490+ return True
491+
492+ return False
493+
494+ return [l for l in filtered_for_project if filter (full_task_graph [l ])]
495+
496+
453497@register_target_task ("graphics_tasks" )
454498def target_tasks_graphics (full_task_graph , parameters , graph_config ):
455499 """In addition to doing the filtering by project that the 'default'
0 commit comments