Bug 1631534 - Fix moztest to support windows paths for running wpt tests locally. r=jgraham

moztest assumes os.path but that fails for windows to compare against inputs that use mozpath commands with a posix slash.

Differential Revision: https://phabricator.services.mozilla.com/D71619
This commit is contained in:
Joel Maher 2020-04-20 19:04:26 +00:00
Родитель c024efcb60
Коммит 87cf0d2b49
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -664,22 +664,22 @@ class TestResolver(MozbuildObject):
for manifest, data in six.iteritems(manifests):
tests_root = data["tests_path"]
for test_type, path, tests in manifest:
full_path = os.path.join(tests_root, path)
src_path = os.path.relpath(full_path, self.topsrcdir)
full_path = mozpath.join(tests_root, path)
src_path = mozpath.relpath(full_path, self.topsrcdir)
if test_type not in ["testharness", "reftest", "wdspec", "crashtest"]:
continue
for test in tests:
self._tests.append({
"path": full_path,
"flavor": "web-platform-tests",
"here": os.path.dirname(path),
"here": mozpath.dirname(path),
"manifest": data["manifest_path"],
"name": test.id,
"file_relpath": src_path,
"head": "",
"support-files": "",
"subsuite": test_type,
"dir_relpath": os.path.dirname(src_path),
"dir_relpath": mozpath.dirname(src_path),
"srcdir_relpath": src_path,
})