diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /taskcluster/test/test_mozilla_central.py | |
parent | Initial commit. (diff) | |
download | firefox-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 '')
-rw-r--r-- | taskcluster/test/test_mozilla_central.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/taskcluster/test/test_mozilla_central.py b/taskcluster/test/test_mozilla_central.py new file mode 100644 index 0000000000..0afb5508a0 --- /dev/null +++ b/taskcluster/test/test_mozilla_central.py @@ -0,0 +1,39 @@ +# 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/mozilla-central", + "project": "central", +} + + +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,min_expected", + ( + pytest.param( + lambda t: t.kind == "build" and "fuzzing" in t.attributes["build_platform"], + 5, + id="fuzzing builds", + ), + ), +) +def test_tasks_are_scheduled(optimized_task_graph, filter_tasks, func, min_expected): + """Ensure the specified tasks are scheduled on mozilla-central.""" + tasks = [t.label for t in filter_tasks(optimized_task_graph, func)] + print(tasks) + assert len(tasks) >= min_expected + + +if __name__ == "__main__": + main() |