aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/testing_commands.py
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2024-01-02 07:14:51 +0100
committerGitHub <noreply@github.com>2024-01-02 06:14:51 +0000
commit516cc2cbca55a1d1505a494875d0c2022ac314c2 (patch)
treea62f5c27b7027a10b8a2ab6c4b167f78df9cdaeb /python/servo/testing_commands.py
parentf58541e65263daf60d3f5c3f8ad075b09d25223b (diff)
downloadservo-516cc2cbca55a1d1505a494875d0c2022ac314c2.tar.gz
servo-516cc2cbca55a1d1505a494875d0c2022ac314c2.zip
tidy: A few small improvements and fixes (#30941)
1. Make the tidy output easier to follow 2. Integrate the WPT manifest cleanliness step into tidy itself and don't run it if nothing has changed in the WPT directory. 3. Fix an issue where Python test requirements were not installed, which could cause issues with some modules not being found. Fixes #30002.
Diffstat (limited to 'python/servo/testing_commands.py')
-rw-r--r--python/servo/testing_commands.py22
1 files changed, 10 insertions, 12 deletions
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index 70e2967626d..79175b45f10 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -281,29 +281,27 @@ class MachCommands(CommandBase):
@CommandArgument('--all', default=False, action="store_true", dest="all_files",
help="Check all files, and run the WPT lint in tidy, "
"even if unchanged")
- @CommandArgument('--no-wpt', default=False, action="store_true", dest="no_wpt",
- help="Skip checking that web-platform-tests manifests are up to date")
@CommandArgument('--no-progress', default=False, action="store_true",
help="Don't show progress for tidy")
- @CommandArgument('--stylo', default=False, action="store_true",
- help="Only handle files in the stylo tree")
- def test_tidy(self, all_files, no_progress, stylo, no_wpt=False):
- if no_wpt:
- manifest_dirty = False
- else:
- manifest_dirty = wpt.manifestupdate.update(check_clean=True)
- tidy_failed = tidy.scan(not all_files, not no_progress, stylo=stylo, no_wpt=no_wpt)
+ def test_tidy(self, all_files, no_progress):
+ tidy_failed = tidy.scan(not all_files, not no_progress)
call(["rustup", "install", "nightly-2023-03-18"])
call(["rustup", "component", "add", "rustfmt", "--toolchain", "nightly-2023-03-18"])
rustfmt_failed = call(["cargo", "+nightly-2023-03-18", "fmt", "--", "--check"])
-
if rustfmt_failed:
print("Run `./mach fmt` to fix the formatting")
taplo_failed = format_toml_files_with_taplo()
- return tidy_failed or manifest_dirty or rustfmt_failed or taplo_failed
+ tidy_failed = tidy_failed or rustfmt_failed or taplo_failed
+ print()
+ if tidy_failed:
+ print("\r ❌ test-tidy reported errors.")
+ else:
+ print("\r ✅ test-tidy reported no errors.")
+
+ tidy_failed
@Command('test-scripts',
description='Run tests for all build and support scripts.',