mirror of
https://github.com/servo/servo.git
synced 2025-06-22 08:08:59 +01:00
Auto merge of #9649 - Wafflespeanut:tidy_progress, r=jdm
Refactoring tidy... Improved tidy's code for efficiency (which now shows progress while checking through files) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9649) <!-- Reviewable:end -->
This commit is contained in:
commit
553cf3d8e8
3 changed files with 82 additions and 53 deletions
|
@ -94,10 +94,12 @@ class MachCommands(CommandBase):
|
|||
@CommandArgument('--release', default=False, action="store_true",
|
||||
help="Run with a release build of servo")
|
||||
@CommandArgument('--faster', default=False, action="store_true",
|
||||
help="Only check changed files and skip the WPT lint")
|
||||
def test(self, params, render_mode=DEFAULT_RENDER_MODE, release=False, faster=False):
|
||||
help="Only check changed files and skip the WPT lint in tidy")
|
||||
@CommandArgument('--no-progress', default=False, action="store_true",
|
||||
help="Don't show progress for tidy")
|
||||
def test(self, params, render_mode=DEFAULT_RENDER_MODE, release=False, faster=False, no_progress=False):
|
||||
suites = OrderedDict([
|
||||
("tidy", {"kwargs": {"faster": faster},
|
||||
("tidy", {"kwargs": {"faster": faster, "no_progress": no_progress},
|
||||
"include_arg": "include"}),
|
||||
("ref", {"kwargs": {"kind": render_mode},
|
||||
"paths": [path.abspath(path.join("tests", "ref"))],
|
||||
|
@ -292,9 +294,11 @@ class MachCommands(CommandBase):
|
|||
description='Run the source code tidiness check',
|
||||
category='testing')
|
||||
@CommandArgument('--faster', default=False, action="store_true",
|
||||
help="Only check changed files and skip the WPT lint")
|
||||
def test_tidy(self, faster):
|
||||
return tidy.scan(faster)
|
||||
help="Only check changed files and skip the WPT lint in tidy")
|
||||
@CommandArgument('--no-progress', default=False, action="store_true",
|
||||
help="Don't show progress for tidy")
|
||||
def test_tidy(self, faster, no_progress):
|
||||
return tidy.scan(faster, not no_progress)
|
||||
|
||||
@Command('test-webidl',
|
||||
description='Run the WebIDL parser tests',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue