diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /taskcluster/test/test_autoland.py | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'taskcluster/test/test_autoland.py')
-rw-r--r-- | taskcluster/test/test_autoland.py | 28 |
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 |