mirror of
https://github.com/servo/servo.git
synced 2025-08-10 16:05:43 +01:00
Update web-platform-tests to revision b202bbb5aa0d235b22bac11fe902eab1094ef9d2
This commit is contained in:
parent
9a6c96808b
commit
e90dd8bc6b
43 changed files with 669 additions and 286 deletions
26
tests/wpt/web-platform-tests/tools/.coveragerc
Normal file
26
tests/wpt/web-platform-tests/tools/.coveragerc
Normal file
|
@ -0,0 +1,26 @@
|
|||
[run]
|
||||
branch = True
|
||||
parallel = True
|
||||
omit =
|
||||
html5lib/*
|
||||
py/*
|
||||
pytest/*
|
||||
pywebsocket/*
|
||||
six/*
|
||||
webdriver/*
|
||||
wptserve/*
|
||||
*/site-packages/*
|
||||
*/lib_pypy/*
|
||||
|
||||
[paths]
|
||||
html5lib =
|
||||
html5lib/html5lib
|
||||
.tox/**/site-packages/html5lib
|
||||
|
||||
pytest =
|
||||
pytest/_pytest
|
||||
.tox/**/site-packages/_pytest
|
||||
|
||||
py =
|
||||
py/py
|
||||
.tox/**/site-packages/py
|
|
@ -1,5 +1,6 @@
|
|||
*#
|
||||
.coverage*
|
||||
.coverage
|
||||
.coverage.*
|
||||
htmlcov/
|
||||
coverage.xml
|
||||
.tox/
|
||||
|
|
|
@ -9,7 +9,6 @@ import os
|
|||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from collections import defaultdict
|
||||
|
||||
|
@ -135,28 +134,6 @@ def check_ahem_copy(repo_root, path):
|
|||
return []
|
||||
|
||||
|
||||
def check_git_ignore(repo_root, paths):
|
||||
errors = []
|
||||
with tempfile.TemporaryFile('w+') as f:
|
||||
f.write('\n'.join(paths))
|
||||
f.seek(0)
|
||||
try:
|
||||
matches = subprocess.check_output(
|
||||
["git", "check-ignore", "--verbose", "--no-index", "--stdin"], stdin=f)
|
||||
for match in matches.strip().split('\n'):
|
||||
match_filter, path = match.split()
|
||||
_, _, filter_string = match_filter.split(':')
|
||||
# If the matching filter reported by check-ignore is a special-case exception,
|
||||
# that's fine. Otherwise, it requires a new special-case exception.
|
||||
if filter_string != '!' + path:
|
||||
errors += [("IGNORED PATH", "%s matches an ignore filter in .gitignore - "
|
||||
"please add a .gitignore exception" % path, path, None)]
|
||||
except subprocess.CalledProcessError as e:
|
||||
# Nonzero return code means that no match exists.
|
||||
pass
|
||||
return errors
|
||||
|
||||
|
||||
drafts_csswg_re = re.compile(r"https?\:\/\/drafts\.csswg\.org\/([^/?#]+)")
|
||||
w3c_tr_re = re.compile(r"https?\:\/\/www\.w3c?\.org\/TR\/([^/?#]+)")
|
||||
w3c_dev_re = re.compile(r"https?\:\/\/dev\.w3c?\.org\/[^/?#]+\/([^/?#]+)")
|
||||
|
@ -301,9 +278,7 @@ def filter_whitelist_errors(data, errors):
|
|||
|
||||
for i, (error_type, msg, path, line) in enumerate(errors):
|
||||
normpath = os.path.normcase(path)
|
||||
# Allow whitelisting all lint errors except the IGNORED PATH lint,
|
||||
# which explains how to fix it correctly and shouldn't be ignored.
|
||||
if error_type in data and error_type != "IGNORED PATH":
|
||||
if error_type in data:
|
||||
wl_files = data[error_type]
|
||||
for file_match, allowed_lines in iteritems(wl_files):
|
||||
if None in allowed_lines or line in allowed_lines:
|
||||
|
@ -865,13 +840,6 @@ path_lints = [check_path_length, check_worker_collision, check_ahem_copy]
|
|||
all_paths_lints = [check_css_globally_unique]
|
||||
file_lints = [check_regexp_line, check_parsed, check_python_ast, check_script_metadata]
|
||||
|
||||
# Don't break users of the lint that don't have git installed.
|
||||
try:
|
||||
subprocess.check_output(["git", "--version"])
|
||||
all_paths_lints += [check_git_ignore]
|
||||
except subprocess.CalledProcessError:
|
||||
print('No git present; skipping .gitignore lint.')
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = create_parser().parse_args()
|
||||
error_count = main(**vars(args))
|
||||
|
|
6
tests/wpt/web-platform-tests/tools/third_party/funcsigs/.coveragerc
vendored
Normal file
6
tests/wpt/web-platform-tests/tools/third_party/funcsigs/.coveragerc
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
[run]
|
||||
source=funcsigs
|
||||
omit=funcsigs/odict*
|
||||
|
||||
[report]
|
||||
include=funcsigs*
|
4
tests/wpt/web-platform-tests/tools/third_party/pytest/.coveragerc
vendored
Normal file
4
tests/wpt/web-platform-tests/tools/third_party/pytest/.coveragerc
vendored
Normal file
|
@ -0,0 +1,4 @@
|
|||
[run]
|
||||
omit =
|
||||
# standlonetemplate is read dynamically and tested by test_genscript
|
||||
*standalonetemplate.py
|
11
tests/wpt/web-platform-tests/tools/wptserve/.coveragerc
Normal file
11
tests/wpt/web-platform-tests/tools/wptserve/.coveragerc
Normal file
|
@ -0,0 +1,11 @@
|
|||
[run]
|
||||
branch = True
|
||||
parallel = True
|
||||
omit =
|
||||
*/site-packages/*
|
||||
*/lib_pypy/*
|
||||
|
||||
[paths]
|
||||
wptserve =
|
||||
wptserve
|
||||
.tox/**/site-packages/wptserve
|
Loading…
Add table
Add a link
Reference in a new issue