1 # Any copyright is dedicated to the public domain.
2 # http://creativecommons.org/publicdomain/zero/1.0/
5 from mozunit
import main
7 pytestmark
= pytest
.mark
.slow
10 "head_repository": "https://hg.mozilla.org/integration/autoland",
11 "project": "autoland",
15 def test_generate_graph(optimized_task_graph
):
16 """Simply tests that generating the graph does not fail."""
17 assert len(optimized_task_graph
.tasks
) > 0
20 @pytest.mark
.parametrize(
24 lambda t
: t
.kind
== "build" and "fuzzing" in t
.attributes
["build_platform"],
30 def test_tasks_are_scheduled(optimized_task_graph
, filter_tasks
, func
, min_expected
):
31 """Ensure the specified tasks are scheduled on mozilla-central."""
32 tasks
= [t
.label
for t
in filter_tasks(optimized_task_graph
, func
)]
33 assert len(tasks
) >= min_expected
36 @pytest.mark
.parametrize(
40 lambda t
: t
.kind
== "build" and "ccov" in t
.attributes
["build_platform"],
45 def test_tasks_are_not_scheduled(
46 optimized_task_graph
, filter_tasks
, print_dependents
, func
48 """Ensure the specified tasks are not scheduled on autoland."""
49 tasks
= [t
.label
for t
in filter_tasks(optimized_task_graph
, func
)]
51 print_dependents(optimized_task_graph
, t
)
55 if __name__
== "__main__":