Bug 1689526 - Use MOZHARNESS_TEST_PATHS for web platform tests for isolate_test action. r=taskgraph-reviewers,jmaher

Differential Revision: https://phabricator.services.mozilla.com/D103456
This commit is contained in:
Mike Hommey 2021-01-29 12:11:24 +00:00
parent c1515076ae
commit 4dd20e86f3

View File

@ -191,27 +191,15 @@ def create_isolate_failure_tasks(task_definition, failures, level, times):
else:
task_definition["payload"]["command"] = command
# saved_command is a saved version of the
# task_definition['payload']['command'] with the repeat
# arguments. We need to save it since
# task_definition['payload']['command'] will be modified in the failure_path loop
# when we are isolating web-platform-tests.
saved_command = copy.deepcopy(task_definition["payload"]["command"])
for failure_path in failures[failure_group]:
th_dict["symbol"] = symbol + failure_group_suffix
if is_windows and not is_wpt:
failure_path = "\\".join(failure_path.split("/"))
if is_wpt:
include_args = ["--include={}".format(failure_path)]
task_definition["payload"]["command"] = add_args_to_command(
saved_command, extra_args=include_args
)
else:
task_definition["payload"]["env"][
"MOZHARNESS_TEST_PATHS"
] = six.ensure_text(json.dumps({suite: [failure_path]}, sort_keys=True))
failure_path = "testing/web-platform/tests" + failure_path
if is_windows:
failure_path = "\\".join(failure_path.split("/"))
task_definition["payload"]["env"][
"MOZHARNESS_TEST_PATHS"
] = six.ensure_text(json.dumps({suite: [failure_path]}, sort_keys=True))
logger.info(
"Creating task for path {} with command {}".format(