Bug 1821996 - Update chunk logic to handle new paths for webdriver tests r=jmaher,jgraham

Depends on D177932

Differential Revision: https://phabricator.services.mozilla.com/D177933
This commit is contained in:
Julian Descottes 2023-05-23 20:41:02 +00:00
Родитель cbb58ca5fc
Коммит f8912065a0
1 изменённых файлов: 7 добавлений и 1 удалений

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

@ -836,7 +836,13 @@ class TestResolver(MozbuildObject):
"""
# This takes into account that for mozilla-specific WPT tests, the path
# contains an extra '/_mozilla' prefix that must be accounted for.
depth = depth + 1 if test["name"].startswith("/_mozilla") else depth
if test["name"].startswith("/_mozilla"):
depth = depth + 1
# Webdriver tests are nested in "classic" and "bidi" folders. Increase
# the depth to avoid grouping all classic or bidi tests in one chunk.
if test["name"].startswith(("/webdriver", "/_mozilla/webdriver")):
depth = depth + 1
group = os.path.dirname(test["name"])
while group.count("/") > depth: