Auto merge of #20312 - jdm:fix-manifest-update, r=asajeffrey

Avoid using WPT test runner to update the test manifest.

Our old code to update the test manifest relied on running no actual tests. This is now broken by d0a30f8821 (diff-c9390ffce43b4924882faf365b1bf136), so these changes duplicate Firefox's implementation to reduce risk of future breakage. This will allow automated WPT syncing to resume.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20312)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-03-16 16:16:23 -04:00 committed by GitHub
commit 74d6a91ee5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 173 additions and 21 deletions

View file

@ -77,6 +77,19 @@ def create_parser_wpt():
return parser
def create_parser_manifest_update():
import manifestupdate
return manifestupdate.create_parser()
def run_update(topdir, check_clean=False, rebuild=False, **kwargs):
import manifestupdate
from wptrunner import wptlogging
logger = wptlogging.setup(kwargs, {"mach": sys.stdout})
wpt_dir = os.path.abspath(os.path.join(topdir, 'tests', 'wpt'))
manifestupdate.update(logger, wpt_dir, check_clean, rebuild)
@CommandProvider
class MachCommands(CommandBase):
DEFAULT_RENDER_MODE = "cpu"
@ -429,11 +442,9 @@ class MachCommands(CommandBase):
@Command('update-manifest',
description='Run test-wpt --manifest-update SKIP_TESTS to regenerate MANIFEST.json',
category='testing',
parser=create_parser_wpt)
parser=create_parser_manifest_update)
def update_manifest(self, **kwargs):
kwargs['test_list'].append(str('SKIP_TESTS'))
kwargs['manifest_update'] = True
return self.test_wpt(**kwargs)
return run_update(self.context.topdir, **kwargs)
@Command('update-wpt',
description='Update the web platform tests',