mirror of
https://github.com/servo/servo.git
synced 2025-07-01 20:43:39 +01:00
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:
commit
74d6a91ee5
3 changed files with 173 additions and 21 deletions
|
@ -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',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue