Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove --faster flag from test-tidy, go fast by default. Fixes 11217 #11409

Merged
merged 1 commit into from
May 25, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ matrix:
include:
- sudo: false
script:
- ./mach test-tidy --self-test
- ./mach test-tidy --no-progress
- ./mach test-tidy --no-progress --all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment - let's have the --all line be first.

- ./mach test-tidy --no-progress --self-test
cache: false
- sudo: 9000
dist: trusty
Expand Down
2 changes: 1 addition & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data:
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy --faster` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

Either:
Expand Down
2 changes: 1 addition & 1 deletion etc/ci/buildbot_steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ mac-rel-css:
- bash ./etc/ci/manifest_changed.sh

linux-dev:
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I swapped the order of the test-tidys so that it matched the order in travis.yml.

- ./mach test-tidy --no-progress
- ./mach test-tidy --no-progress --all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- ./mach test-tidy --no-progress --self-test
- ./mach build --dev
- ./mach test-compiletest
Expand Down
21 changes: 3 additions & 18 deletions python/servo/testing_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,33 +255,18 @@ def test_content(self):
@Command('test-tidy',
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 in tidy, "
"if there are no changes in the WPT files. Cannot be used with --all")
@CommandArgument('--all', default=False, action="store_true", dest="all_files",
help="Check all files, and run the WPT lint in tidy, "
"even if unchanged. Cannot be used with --faster")
"even if unchanged")
@CommandArgument('--no-progress', default=False, action="store_true",
help="Don't show progress for tidy")
@CommandArgument('--self-test', default=False, action="store_true",
help="Run unit tests for tidy")
def test_tidy(self, faster, all_files, no_progress, self_test):
def test_tidy(self, all_files, no_progress, self_test):
if self_test:
return test_tidy.do_tests()
else:
# The `test-tidy` command is currently mid-migration from --faster to --all.
# Since --faster and --all are opposites, they cannot both be used at the same time
if faster and all_files:
print("Cannot tidy --all while also being --faster")
return -1

# |--faster|--all|behaviour of tidy.scan()
# | false|false|scan all files # This was the behaviour before adding --all
# | true|false|only scan changed files # Expected behaviour if --faster is used
# | false| true|scan all files # Expected behaviour if --all is used
#
# The pattern: if `faster` is true, go fast. Otherwise, go slow.
return tidy.scan(faster, not no_progress)
return tidy.scan(not all_files, not no_progress)

@Command('test-webidl',
description='Run the WebIDL parser tests',
Expand Down