Bug 1428585 - Fail the wpt lint if the lint process has a non-zero exit code, r=ahal
authorJames Graham <james@hoppipolla.co.uk>
Mon, 08 Jan 2018 10:52:09 +0000
changeset 452673 849d7fde04aa048f100fd3fc575dc98041859b84
parent 452672 bd2b041cd739c0f354d6a0308c2ef9e141da3590
child 452674 d8d1941bc2bf59520e6eca2f518f9cafa8fe8938
push id1648
push usermtabara@mozilla.com
push dateThu, 01 Mar 2018 12:45:47 +0000
treeherdermozilla-release@cbb9688c2eeb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1428585
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1428585 - Fail the wpt lint if the lint process has a non-zero exit code, r=ahal MozReview-Commit-ID: GiUewbmru37
tools/lint/wpt/wpt.py
--- a/tools/lint/wpt/wpt.py
+++ b/tools/lint/wpt/wpt.py
@@ -23,20 +23,28 @@ def lint(files, config, **kwargs):
         try:
             data = json.loads(line)
         except ValueError:
             return
         data["level"] = "error"
         data["path"] = os.path.relpath(os.path.join(tests_dir, data["path"]), kwargs['root'])
         results.append(result.from_config(config, **data))
 
+    if files == [tests_dir]:
+        print >> sys.stderr, "No specific files specified, running the full wpt lint (this is slow)"
+        files = ["--all"]
     cmd = [os.path.join(tests_dir, 'wpt'), 'lint', '--json'] + files
     if platform.system() == 'Windows':
         cmd.insert(0, sys.executable)
 
     proc = ProcessHandler(cmd, env=os.environ, processOutputLine=process_line)
     proc.run()
     try:
         proc.wait()
+        if proc.returncode != 0:
+            results.append(
+                result.from_config(config,
+                                   message="Lint process exited with return code %s" %
+                                   proc.returncode))
     except KeyboardInterrupt:
         proc.kill()
 
     return results