From 2f994b2c2d02afb5bbd0c091f217740c7ac43ef8 Mon Sep 17 00:00:00 2001 From: PythonNut Date: Wed, 13 Jan 2016 12:10:24 +0501 Subject: [PATCH] servo: Merge #9277 - Call WPT lint directly in tidy, fixes #9189 (from PythonNut:master); r=Wafflespeanut This should be fairly straightforward. :) Source-Repo: https://github.com/servo/servo Source-Revision: 9c8382cbde73a2d5f57c4a8a65d4ae55c03fd990 --- servo/python/tidy.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/servo/python/tidy.py b/servo/python/tidy.py index 0b7c96c98963..a3a7bf65ab99 100644 --- a/servo/python/tidy.py +++ b/servo/python/tidy.py @@ -13,6 +13,7 @@ import fnmatch import itertools import re import StringIO +import site import subprocess import sys from licenseck import licenses @@ -556,11 +557,11 @@ def check_reftest_html_files_in_basic_list(reftest_dir): def check_wpt_lint_errors(): wpt_working_dir = os.path.abspath(os.path.join(".", "tests", "wpt", "web-platform-tests")) - lint_cmd = os.path.join(wpt_working_dir, "lint") - try: - subprocess.check_call(lint_cmd, cwd=wpt_working_dir) # Must run from wpt's working dir - except subprocess.CalledProcessError as e: - yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status {0}".format(e.returncode)) + site.addsitedir(wpt_working_dir) + from tools.lint import lint + returncode = lint.main() + if returncode: + yield ("WPT Lint Tool", "", "lint error(s) in Web Platform Tests: exit status {0}".format(returncode)) def get_file_list(directory, only_changed_files=False):