Bug 1317970 - Filter python unittests through manifestparser.active_tests, r=chmanchester

The build system's TestResolver does a pretty good job of getting the right manifestparser
based tests to run, but it isn't perfect. Notably, it ignores the 'disabled' key. We filter
the tests through manifestparser here to make sure the build system didn't miss anything.
For context, this is also what the other test harnesses (e.g mochitest) do as well.

MozReview-Commit-ID: FaHb4nvuoK9

--HG--
extra : rebase_source : 476b7068c3ddf7d9757d605de5843e21547c6c33
This commit is contained in:
Andrew Halberstadt 2016-11-17 16:30:27 -05:00
Родитель 6adcf5b456
Коммит 6a6ba62ba2
1 изменённых файлов: 8 добавлений и 1 удалений

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

@ -15,6 +15,9 @@ from concurrent.futures import (
thread,
)
import mozinfo
from manifestparser import TestManifest
from mozbuild.base import (
MachCommandBase,
)
@ -128,6 +131,10 @@ class MachCommands(MachCommandBase):
self.log(logging.WARN, 'python-test', {}, message)
return 1
mp = TestManifest()
mp.tests.extend(test_objects)
tests = mp.active_tests(disabled=False, **mozinfo.info)
self.jobs = jobs
self.terminate = False
self.verbose = verbose
@ -135,7 +142,7 @@ class MachCommands(MachCommandBase):
return_code = 0
with ThreadPoolExecutor(max_workers=self.jobs) as executor:
futures = [executor.submit(self._run_python_test, test['path'])
for test in test_objects]
for test in tests]
try:
for future in as_completed(futures):