mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
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>
This commit is contained in:
parent
b2f73723f8
commit
04a9b8ca39
4 changed files with 4 additions and 6 deletions
|
@ -473,7 +473,7 @@ mod gen {
|
||||||
enabled: bool,
|
enabled: bool,
|
||||||
},
|
},
|
||||||
testing: {
|
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,
|
enabled: bool,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -10,9 +10,7 @@
|
||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
from typing import Dict, Optional
|
from typing import Optional
|
||||||
|
|
||||||
from .. import util
|
|
||||||
|
|
||||||
|
|
||||||
class Base:
|
class Base:
|
||||||
|
|
|
@ -218,7 +218,7 @@ class MachCommands(CommandBase):
|
||||||
else:
|
else:
|
||||||
print("\r ✅ test-tidy reported no errors.")
|
print("\r ✅ test-tidy reported no errors.")
|
||||||
|
|
||||||
tidy_failed
|
return tidy_failed
|
||||||
|
|
||||||
@Command('test-scripts',
|
@Command('test-scripts',
|
||||||
description='Run tests for all build and support scripts.',
|
description='Run tests for all build and support scripts.',
|
||||||
|
|
|
@ -822,7 +822,7 @@ def check_spec(file_name, lines):
|
||||||
macro_patt = re.compile(r"^\s*\S+!(.*)$")
|
macro_patt = re.compile(r"^\s*\S+!(.*)$")
|
||||||
|
|
||||||
# Pattern representing a line with comment containing a spec link
|
# 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
|
# Pattern representing a line with comment or attribute
|
||||||
comment_patt = re.compile(r"^\s*(///?.+|#\[.+\])$")
|
comment_patt = re.compile(r"^\s*(///?.+|#\[.+\])$")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue