Bug 1523303 - [mozharness] Normalize '-chunked' out of suite name when reading MOZHARNESS_TEST_PATHS in desktop_unittest.py, r=gbrown

Mozharness appends -chunked/-coverage to some suites, but the build system/test
resolver don't have any concept of these things. We need to normalize these out
for the purposes of MOZHARNESS_TEST_PATHS.

Differential Revision: https://phabricator.services.mozilla.com/D25015

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Halberstadt 2019-03-27 15:59:55 +00:00
Родитель 573782c2eb
Коммит 5d91672933
2 изменённых файлов: 6 добавлений и 4 удалений

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

@ -364,6 +364,12 @@ class DesktopUnittest(TestingMixin, MercurialScript, MozbaseMixin,
def _get_mozharness_test_paths(self, suite_category, suite):
test_paths = json.loads(os.environ.get('MOZHARNESS_TEST_PATHS', '""'))
if '-chunked' in suite:
suite = suite[:suite.index('-chunked')]
if '-coverage' in suite:
suite = suite[:suite.index('-coverage')]
if not test_paths or suite not in test_paths:
return None

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

@ -39,10 +39,7 @@ def all_suites(patch_resolver):
KNOWN_FAILURES = (
'browser-chrome-addons',
'browser-chrome-chunked',
'browser-chrome-coverage',
'browser-chrome-instrumentation',
'chrome-chunked',
'cppunittest',
'gtest',
'jittest',
@ -61,7 +58,6 @@ KNOWN_FAILURES = (
'plain-gpu',
'valgrind-plain',
'xpcshell-addons',
'xpcshell-coverage',
)
"""A suite being listed here means it won't work properly with
MOZHARNESS_TEST_PATHS (the mechanism |mach try fuzzy <path>| uses.