Bug 1569982 - Respect verify annotations when running tests in mach with --verify; r=bc

Test manifest annotations like "skip-if = verify" are normally handled in mozharness:
When a TV task finds a modified test that needs verification, but that test is skipped
in verify mode, mozharness discards the test from the list of tests to be run.
When running tests locally (mach mochitest, etc), these annotations should also be
respected, and are currently handled in wpt and reftest harnesses, but not in
mochitest or xpcshell -- rectified by this patch. mochitest and xpcshell had
neglected to set mozinfo["verify"] when running in verify mode -- easily corrected.
It should be noted that when running tests locally and a single test is requested,
most test harnesses run the requested test even if it is skip-annotated. Thus,
"mach test <test> --verify" will continue to run tests annotated "skip-if = verify"
and this patch only changes the mochitest/xpcshell behavior of verify-skipped
tests when run with "mach test <directory> --verify" -- a long-running test mode
with complex logging never used in continuous integration.

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Geoff Brown 2019-08-05 18:24:52 +00:00
Родитель b8d7e98578
Коммит b2e6f93a11
2 изменённых файлов: 2 добавлений и 0 удалений

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

@ -2596,6 +2596,7 @@ toolbar#nav-bar {
'dom.serviceWorkers.parent_intercept', False),
"socketprocess_e10s": self.extraPrefs.get(
'network.process.enabled', False),
"verify": options.verify,
"webrender": options.enable_webrender,
})

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

@ -1217,6 +1217,7 @@ class XPCShellTests(object):
self.mozInfo['fission'] = prefs.get('fission.autostart', False)
self.mozInfo['serviceworker_e10s'] = prefs.get(
'dom.serviceWorkers.parent_intercept', False)
self.mozInfo['verify'] = self.options.get('verify', False)
self.mozInfo['webrender'] = self.enable_webrender
mozinfo.update(self.mozInfo)