mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Don't import wptmanifest when in firefox tree.
This commit is contained in:
parent
29d9c85c56
commit
4c240eb632
1 changed files with 10 additions and 4 deletions
|
@ -30,12 +30,15 @@ wpt = os.path.join(topdir, "tests", "wpt")
|
||||||
def wpt_path(*args):
|
def wpt_path(*args):
|
||||||
return os.path.join(wpt, *args)
|
return os.path.join(wpt, *args)
|
||||||
|
|
||||||
sys.path.append(wpt_path("web-platform-tests", "tools", "wptrunner", "wptrunner"))
|
|
||||||
from wptmanifest import parser, node
|
|
||||||
|
|
||||||
CONFIG_FILE_PATH = os.path.join(".", "servo-tidy.toml")
|
CONFIG_FILE_PATH = os.path.join(".", "servo-tidy.toml")
|
||||||
WPT_MANIFEST_PATH = wpt_path("include.ini")
|
WPT_MANIFEST_PATH = wpt_path("include.ini")
|
||||||
|
|
||||||
|
# Import wptmanifest only when we do have wpt in tree, i.e. we're not
|
||||||
|
# inside a Firefox checkout.
|
||||||
|
if os.path.isfile(WPT_MANIFEST_PATH):
|
||||||
|
sys.path.append(wpt_path("web-platform-tests", "tools", "wptrunner", "wptrunner"))
|
||||||
|
from wptmanifest import parser, node
|
||||||
|
|
||||||
# Default configs
|
# Default configs
|
||||||
config = {
|
config = {
|
||||||
"skip-check-length": False,
|
"skip-check-length": False,
|
||||||
|
@ -1166,7 +1169,10 @@ def scan(only_changed_files=False, progress=True, stylo=False):
|
||||||
# check config file for errors
|
# check config file for errors
|
||||||
config_errors = check_config_file(CONFIG_FILE_PATH)
|
config_errors = check_config_file(CONFIG_FILE_PATH)
|
||||||
# check ini directories exist
|
# check ini directories exist
|
||||||
manifest_errors = check_manifest_dirs(WPT_MANIFEST_PATH)
|
if os.path.isfile(WPT_MANIFEST_PATH):
|
||||||
|
manifest_errors = check_manifest_dirs(WPT_MANIFEST_PATH)
|
||||||
|
else:
|
||||||
|
manifest_errors = ()
|
||||||
# check directories contain expected files
|
# check directories contain expected files
|
||||||
directory_errors = check_directory_files(config['check_ext'])
|
directory_errors = check_directory_files(config['check_ext'])
|
||||||
# standard checks
|
# standard checks
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue