mirror of
https://github.com/servo/servo.git
synced 2025-07-03 13:33:39 +01:00
Make mach test-tidy --no-wpt
compatible with Python3
Note: tidiness tests of Python file using flake8 was effectively broken since a previous commit for Python3 compatibility
This commit is contained in:
parent
8d4cedb911
commit
9d04f231f4
2 changed files with 66 additions and 66 deletions
|
@ -776,7 +776,7 @@ class MachCommands(CommandBase):
|
|||
def setup_clangfmt(env):
|
||||
cmd = "clang-format.exe" if sys.platform == "win32" else "clang-format"
|
||||
try:
|
||||
version = check_output([cmd, "--version"], env=env).rstrip()
|
||||
version = check_output([cmd, "--version"], env=env, universal_newlines=True).rstrip()
|
||||
print(version)
|
||||
if not version.startswith("clang-format version {}.".format(CLANGFMT_VERSION)):
|
||||
print("clang-format: wrong version (v{} required). Skipping CPP formatting.".format(CLANGFMT_VERSION))
|
||||
|
@ -785,7 +785,7 @@ def setup_clangfmt(env):
|
|||
print("clang-format not installed. Skipping CPP formatting.")
|
||||
return False, None, None
|
||||
gitcmd = ['git', 'ls-files']
|
||||
gitfiles = check_output(gitcmd + CLANGFMT_CPP_DIRS).splitlines()
|
||||
gitfiles = check_output(gitcmd + CLANGFMT_CPP_DIRS, universal_newlines=True).splitlines()
|
||||
filtered = [line for line in gitfiles if line.endswith(".h") or line.endswith(".cpp")]
|
||||
return True, cmd, filtered
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue