aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMukilan Thiyagarajan <mukilan@igalia.com>2024-01-31 11:20:36 +0530
committerGitHub <noreply@github.com>2024-01-31 05:50:36 +0000
commit04a9b8ca395989fb1672d279be47ad6ba0c808f1 (patch)
treefaf28bbc3944dbe57315005bb6db95d767be376b
parentb2f73723f881889650304107676c110efb5ec5cd (diff)
downloadservo-04a9b8ca395989fb1672d279be47ad6ba0c808f1.tar.gz
servo-04a9b8ca395989fb1672d279be47ad6ba0c808f1.zip
Fix bugs in `mach test-tidy` (#31232)
* mach: test-tidy should return 1 for failure Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * fix lint issues Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * mach: tidy should allow spec links with trailing text Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
-rw-r--r--components/config/prefs.rs2
-rw-r--r--python/servo/platform/base.py4
-rw-r--r--python/servo/testing_commands.py2
-rw-r--r--python/tidy/tidy.py2
4 files changed, 4 insertions, 6 deletions
diff --git a/components/config/prefs.rs b/components/config/prefs.rs
index 61ca551c1d1..f1854581371 100644
--- a/components/config/prefs.rs
+++ b/components/config/prefs.rs
@@ -473,7 +473,7 @@ mod gen {
enabled: bool,
},
testing: {
- /// Enable a non-standard event handler for verifying behavior of media elements during tests.
+ /// Enable a non-standard event handler for verifying behavior of media elements during tests.
enabled: bool,
}
},
diff --git a/python/servo/platform/base.py b/python/servo/platform/base.py
index b654a43cd5c..e6d3e955cda 100644
--- a/python/servo/platform/base.py
+++ b/python/servo/platform/base.py
@@ -10,9 +10,7 @@
import os
import shutil
import subprocess
-from typing import Dict, Optional
-
-from .. import util
+from typing import Optional
class Base:
diff --git a/python/servo/testing_commands.py b/python/servo/testing_commands.py
index f93cb75ff0c..2ca85569c58 100644
--- a/python/servo/testing_commands.py
+++ b/python/servo/testing_commands.py
@@ -218,7 +218,7 @@ class MachCommands(CommandBase):
else:
print("\r ✅ test-tidy reported no errors.")
- tidy_failed
+ return tidy_failed
@Command('test-scripts',
description='Run tests for all build and support scripts.',
diff --git a/python/tidy/tidy.py b/python/tidy/tidy.py
index a837c4b8577..584291c5ccf 100644
--- a/python/tidy/tidy.py
+++ b/python/tidy/tidy.py
@@ -822,7 +822,7 @@ def check_spec(file_name, lines):
macro_patt = re.compile(r"^\s*\S+!(.*)$")
# Pattern representing a line with comment containing a spec link
- link_patt = re.compile(r"^\s*///? (<https://.+>|https://.+)$")
+ link_patt = re.compile(r"^\s*///? (<https://.+>.*|https://.+)$")
# Pattern representing a line with comment or attribute
comment_patt = re.compile(r"^\s*(///?.+|#\[.+\])$")