зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1741745 - [taskgraph] Introduce a 'run-without-variant' key, r=jmaher
Tasks that set this key to false *will not* run under the standard no variant configuration. This is needed to replace the 'e10s=false' case (i.e tasks that *only* run with 1proc like mochitest-chrome or mochitest-a11y. Depends on D133224 Differential Revision: https://phabricator.services.mozilla.com/D133225
This commit is contained in:
Родитель
73391222d7
Коммит
6798e0de5a
|
@ -4,7 +4,7 @@
|
|||
---
|
||||
job-defaults:
|
||||
test-manifest-loader: null # don't load tests in the taskgraph
|
||||
e10s:
|
||||
run-without-variant:
|
||||
by-test-platform:
|
||||
android.*: true
|
||||
default: false
|
||||
|
|
|
@ -128,7 +128,7 @@ mochitest-a11y:
|
|||
schedules-component: mochitest-a11y
|
||||
test-manifest-loader: default # ensure we don't run with manifest-scheduling
|
||||
loopback-video: true
|
||||
e10s: false
|
||||
run-without-variant: false
|
||||
variants:
|
||||
- 1proc
|
||||
- socketprocess_networking+1proc
|
||||
|
@ -338,7 +338,7 @@ mochitest-chrome:
|
|||
treeherder-symbol: M(c)
|
||||
schedules-component: mochitest-chrome
|
||||
loopback-video: true
|
||||
e10s: false
|
||||
run-without-variant: false
|
||||
variants:
|
||||
- 1proc
|
||||
- socketprocess_networking+1proc
|
||||
|
@ -789,9 +789,7 @@ mochitest-valgrind:
|
|||
loopback-video: true
|
||||
chunks: 40
|
||||
max-run-time: 14400
|
||||
# We could re-enable e10s later.
|
||||
# There's no intrinsic reason not to use it.
|
||||
e10s: false
|
||||
run-without-variant: false
|
||||
variants: ["1proc"]
|
||||
allow-software-gl-layers: false
|
||||
mozharness:
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
when:
|
||||
$eval: '!("android" in task["test-platform"])'
|
||||
suffix: "1proc"
|
||||
replace:
|
||||
e10s: false
|
||||
merge:
|
||||
attributes:
|
||||
e10s: false
|
||||
|
@ -28,7 +26,7 @@ aab:
|
|||
description: "{description} with aab test_runner"
|
||||
contact: agi
|
||||
when: &gv_e10s_filter
|
||||
$eval: '"android" in task["test-platform"] && task.e10s in [true, "both"]'
|
||||
$eval: '"android" in task["test-platform"]'
|
||||
suffix: "aab"
|
||||
# Need to add jdk but there isn't a good way to do that
|
||||
# so we just replace the toolchain list
|
||||
|
@ -67,8 +65,6 @@ geckoview-fission:
|
|||
fission:
|
||||
description: "{description} with fission enabled"
|
||||
contact: cpeterson
|
||||
when: &fission_filter
|
||||
$eval: task.e10s in [true, "both"]
|
||||
suffix: "fis"
|
||||
merge:
|
||||
mozharness:
|
||||
|
@ -78,8 +74,6 @@ fission:
|
|||
fission-xorigin:
|
||||
description: "{description} with cross-origin and fission enabled"
|
||||
contact: cpeterson
|
||||
when:
|
||||
<<: *fission_filter
|
||||
suffix: "fis-xorig"
|
||||
replace:
|
||||
e10s: true
|
||||
|
|
|
@ -85,13 +85,22 @@ def test_split_variants(monkeypatch, run_transform, make_test_task):
|
|||
run_split_variants = partial(run_transform, test_transforms.variant.split_variants)
|
||||
|
||||
# test no variants
|
||||
input_task = make_test_task()
|
||||
input_task = make_test_task(
|
||||
**{
|
||||
"run-without-variant": True,
|
||||
}
|
||||
)
|
||||
tasks = list(run_split_variants(input_task))
|
||||
assert len(tasks) == 1
|
||||
assert tasks[0] == input_task
|
||||
|
||||
# test variants are split into expected tasks
|
||||
input_task["variants"] = ["foo", "bar"]
|
||||
input_task = make_test_task(
|
||||
**{
|
||||
"run-without-variant": True,
|
||||
"variants": ["foo", "bar"],
|
||||
}
|
||||
)
|
||||
tasks = list(run_split_variants(input_task))
|
||||
assert len(tasks) == 3
|
||||
assert tasks[0] == make_test_task()
|
||||
|
@ -104,6 +113,7 @@ def test_split_variants(monkeypatch, run_transform, make_test_task):
|
|||
# test composite variants
|
||||
input_task = make_test_task(
|
||||
**{
|
||||
"run-without-variant": True,
|
||||
"variants": ["foo+bar"],
|
||||
}
|
||||
)
|
||||
|
@ -119,9 +129,10 @@ def test_split_variants(monkeypatch, run_transform, make_test_task):
|
|||
# test 'when' filter
|
||||
input_task = make_test_task(
|
||||
**{
|
||||
"variants": ["foo", "bar", "foo+bar"],
|
||||
"run-without-variant": True,
|
||||
# this should cause task to be filtered out of 'bar' and 'foo+bar' variants
|
||||
"test-platform": "windows",
|
||||
"variants": ["foo", "bar", "foo+bar"],
|
||||
}
|
||||
)
|
||||
tasks = list(run_split_variants(input_task))
|
||||
|
@ -129,6 +140,17 @@ def test_split_variants(monkeypatch, run_transform, make_test_task):
|
|||
assert "unittest_variant" not in tasks[0]["attributes"]
|
||||
assert tasks[1]["attributes"]["unittest_variant"] == "foo"
|
||||
|
||||
# test 'run-without-variants=False'
|
||||
input_task = make_test_task(
|
||||
**{
|
||||
"run-without-variant": False,
|
||||
"variants": ["foo"],
|
||||
}
|
||||
)
|
||||
tasks = list(run_split_variants(input_task))
|
||||
assert len(tasks) == 1
|
||||
assert tasks[0]["attributes"]["unittest_variant"] == "foo"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"task,expected",
|
||||
|
|
|
@ -119,13 +119,8 @@ test_description_schema = Schema(
|
|||
# The different configurations that should be run against this task, defined
|
||||
# in the TEST_VARIANTS object in the variant.py transforms.
|
||||
Optional("variants"): [str],
|
||||
# Whether to run this task with e10s. If false, run
|
||||
# without e10s; if true, run with e10s; if 'both', run one task with and
|
||||
# one task without e10s. E10s tasks have "-e10s" appended to the test name
|
||||
# and treeherder group.
|
||||
Required("e10s"): optionally_keyed_by(
|
||||
"test-platform", "project", Any(bool, "both")
|
||||
),
|
||||
# Whether to run this task without any variants applied.
|
||||
Required("run-without-variant"): optionally_keyed_by("test-platform", bool),
|
||||
# Whether the task should run with WebRender enabled or not.
|
||||
Optional("webrender"): bool,
|
||||
Optional("webrender-run-on-projects"): optionally_keyed_by(
|
||||
|
@ -346,7 +341,6 @@ def set_defaults(config, tasks):
|
|||
else:
|
||||
task.setdefault("webrender", False)
|
||||
|
||||
task.setdefault("e10s", True)
|
||||
task.setdefault("try-name", task["test-name"])
|
||||
task.setdefault("os-groups", [])
|
||||
task.setdefault("run-as-administrator", False)
|
||||
|
@ -363,6 +357,7 @@ def set_defaults(config, tasks):
|
|||
task.setdefault("docker-image", {"in-tree": "ubuntu1804-test"})
|
||||
task.setdefault("checkout", False)
|
||||
task.setdefault("require-signed-extensions", False)
|
||||
task.setdefault("run-without-variant", True)
|
||||
task.setdefault("variants", [])
|
||||
task.setdefault("supports-artifact-builds", True)
|
||||
|
||||
|
@ -379,16 +374,21 @@ transforms.add_validate(test_description_schema)
|
|||
|
||||
@transforms.add
|
||||
def resolve_keys(config, tasks):
|
||||
keys = (
|
||||
"require-signed-extensions",
|
||||
"run-without-variant",
|
||||
)
|
||||
for task in tasks:
|
||||
resolve_keyed_by(
|
||||
task,
|
||||
"require-signed-extensions",
|
||||
item_name=task["test-name"],
|
||||
enforce_single_match=False,
|
||||
**{
|
||||
"release-type": config.params["release_type"],
|
||||
},
|
||||
)
|
||||
for key in keys:
|
||||
resolve_keyed_by(
|
||||
task,
|
||||
key,
|
||||
item_name=task["test-name"],
|
||||
enforce_single_match=False,
|
||||
**{
|
||||
"release-type": config.params["release_type"],
|
||||
},
|
||||
)
|
||||
yield task
|
||||
|
||||
|
||||
|
@ -443,7 +443,7 @@ def make_job_description(config, tasks):
|
|||
label += suffix
|
||||
try_name += suffix
|
||||
|
||||
if task["e10s"]:
|
||||
if "1proc" not in attributes.get("unittest_variant", ""):
|
||||
label += "-e10s"
|
||||
|
||||
if task["chunks"] > 1:
|
||||
|
|
|
@ -263,7 +263,6 @@ def handle_keyed_by(config, tasks):
|
|||
"max-run-time",
|
||||
"chunks",
|
||||
"suite",
|
||||
"e10s",
|
||||
"run-on-projects",
|
||||
"os-groups",
|
||||
"run-as-administrator",
|
||||
|
@ -760,10 +759,6 @@ def set_e10s_attributes(config, tasks):
|
|||
yield task
|
||||
continue
|
||||
|
||||
if not task["e10s"]:
|
||||
continue
|
||||
|
||||
task["e10s"] = True
|
||||
task["attributes"]["e10s"] = True
|
||||
yield task
|
||||
|
||||
|
|
|
@ -75,7 +75,8 @@ def split_variants(config, tasks):
|
|||
for task in tasks:
|
||||
variants = task.pop("variants", [])
|
||||
|
||||
yield copy.deepcopy(task)
|
||||
if task.pop("run-without-variant"):
|
||||
yield copy.deepcopy(task)
|
||||
|
||||
for name in variants:
|
||||
# Apply composite variants (joined by '+') in order.
|
||||
|
|
Загрузка…
Ссылка в новой задаче