summaryrefslogtreecommitdiffstats
path: root/taskcluster/test/test_autoland.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 14:29:10 +0000
commit2aa4a82499d4becd2284cdb482213d541b8804dd (patch)
treeb80bf8bf13c3766139fbacc530efd0dd9d54394c /taskcluster/test/test_autoland.py
parentInitial commit. (diff)
downloadfirefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz
firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip
Adding upstream version 86.0.1.upstream/86.0.1upstream
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.py50
1 files changed, 50 insertions, 0 deletions
diff --git a/taskcluster/test/test_autoland.py b/taskcluster/test/test_autoland.py
new file mode 100644
index 0000000000..4d49997618
--- /dev/null
+++ b/taskcluster/test/test_autoland.py
@@ -0,0 +1,50 @@
+# Any copyright is dedicated to the public domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+
+from __future__ import absolute_import, print_function, unicode_literals
+
+import pytest
+from mozunit import main
+
+pytestmark = pytest.mark.slow
+PARAMS = {
+ "head_repository": "https://hg.mozilla.org/integration/autoland",
+ "project": "autoland",
+ # These ensure this isn't considered a backstop. The pushdate must
+ # be slightly higher than the one in data/pushes.json, and
+ # pushlog_id must not be a multiple of 10.
+ "pushdate": 1593029536,
+ "pushlog_id": "2",
+}
+
+
+def test_generate_graph(optimized_task_graph):
+ """Simply tests that generating the graph does not fail."""
+ assert len(optimized_task_graph.tasks) > 0
+
+
+@pytest.mark.parametrize(
+ "func",
+ (
+ pytest.param(
+ lambda t: t.kind == "build" and "fuzzing" in t.attributes["build_platform"],
+ id="no fuzzing builds",
+ ),
+ pytest.param(
+ lambda t: t.kind == "build" and "ccov" in t.attributes["build_platform"],
+ id="no ccov builds",
+ ),
+ ),
+)
+def test_tasks_are_not_scheduled(
+ optimized_task_graph, filter_tasks, print_dependents, func
+):
+ """Ensure the specified tasks are not scheduled on autoland."""
+ tasks = [t.label for t in filter_tasks(optimized_task_graph, func)]
+ for t in tasks:
+ print_dependents(optimized_task_graph, t)
+ assert tasks == []
+
+
+if __name__ == "__main__":
+ main()