diff --git a/taskcluster/ci/test/compiled.yml b/taskcluster/ci/test/compiled.yml index 263f4e505ff2..87d8c03309e4 100644 --- a/taskcluster/ci/test/compiled.yml +++ b/taskcluster/ci/test/compiled.yml @@ -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 diff --git a/taskcluster/ci/test/mochitest.yml b/taskcluster/ci/test/mochitest.yml index 0ba379142bc6..ca92b197f61d 100644 --- a/taskcluster/ci/test/mochitest.yml +++ b/taskcluster/ci/test/mochitest.yml @@ -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: diff --git a/taskcluster/ci/test/variants.yml b/taskcluster/ci/test/variants.yml index dc8675c6b576..7bfefdb3bf46 100644 --- a/taskcluster/ci/test/variants.yml +++ b/taskcluster/ci/test/variants.yml @@ -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 diff --git a/taskcluster/gecko_taskgraph/test/test_transforms_test.py b/taskcluster/gecko_taskgraph/test/test_transforms_test.py index 0c37ec4775c8..a76f8acf1940 100644 --- a/taskcluster/gecko_taskgraph/test/test_transforms_test.py +++ b/taskcluster/gecko_taskgraph/test/test_transforms_test.py @@ -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", diff --git a/taskcluster/gecko_taskgraph/transforms/test/__init__.py b/taskcluster/gecko_taskgraph/transforms/test/__init__.py index be3c245e2f1b..d9ef55202aa1 100644 --- a/taskcluster/gecko_taskgraph/transforms/test/__init__.py +++ b/taskcluster/gecko_taskgraph/transforms/test/__init__.py @@ -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: diff --git a/taskcluster/gecko_taskgraph/transforms/test/other.py b/taskcluster/gecko_taskgraph/transforms/test/other.py index 783d11e4ebf2..ea530a64357e 100644 --- a/taskcluster/gecko_taskgraph/transforms/test/other.py +++ b/taskcluster/gecko_taskgraph/transforms/test/other.py @@ -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 diff --git a/taskcluster/gecko_taskgraph/transforms/test/variant.py b/taskcluster/gecko_taskgraph/transforms/test/variant.py index b5f04527048d..59af574d3760 100644 --- a/taskcluster/gecko_taskgraph/transforms/test/variant.py +++ b/taskcluster/gecko_taskgraph/transforms/test/variant.py @@ -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.