Bug 1590680 - [moztest.resolve] Fix edge case where puppeteer/wpt manifest data is requested before the main tests, r=gbrown

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Andrew Halberstadt 2019-10-23 14:09:52 +00:00
Родитель 8fd4f4e0e2
Коммит 2a03d935f5
1 изменённых файлов: 5 добавлений и 2 удалений

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

@ -389,11 +389,12 @@ class TestResolver(MozbuildObject):
MozbuildObject.__init__(self, *args, **kwargs)
self.load_tests = self._spawn(TestLoader)
self._tests = None
self._tests = []
self._reset_state()
# These suites aren't registered in moz.build so require special handling.
self._puppeteer_loaded = False
self._tests_loaded = False
self._wpt_loaded = False
def _reset_state(self):
@ -403,8 +404,10 @@ class TestResolver(MozbuildObject):
@property
def tests(self):
if not self._tests:
if not self._tests_loaded:
self._reset_state()
self._tests = list(self.load_tests())
self._tests_loaded = True
return self._tests
@property