summaryrefslogtreecommitdiffstats
path: root/taskcluster/test/test_autoland.py
diff options
context:
space:
mode:
Diffstat (limited to 'taskcluster/test/test_autoland.py')
-rw-r--r--taskcluster/test/test_autoland.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/taskcluster/test/test_autoland.py b/taskcluster/test/test_autoland.py
index 05d181620a..a6607fde01 100644
--- a/taskcluster/test/test_autoland.py
+++ b/taskcluster/test/test_autoland.py
@@ -16,6 +16,34 @@ PARAMS = {
}
+def test_tasks_have_optimization(full_task_graph, filter_tasks):
+ kinds = (
+ "artifact_build",
+ "build-fat-aar",
+ "build",
+ "generate-profile",
+ "hazard",
+ "instrumented-build",
+ "spidermonkey",
+ "static-analysis-autotest",
+ "test",
+ "valgrind",
+ )
+ errors = []
+ for task in filter_tasks(
+ full_task_graph, lambda t: t.kind in kinds and "ccov" not in t.label
+ ):
+ if not task.optimization:
+ errors.append(task.label)
+
+ if errors:
+ label_str = "\n ".join(errors)
+ s_are = " is" if len(errors) == 1 else "s are"
+ pytest.fail(
+ f"The following task{s_are} missing an optimization:\n {label_str}"
+ )
+
+
def test_generate_graph(optimized_task_graph):
"""Simply tests that generating the graph does not fail."""
assert len(optimized_task_graph.tasks) > 0