Bug 1622848 [wpt PR 22278] - Collect code coverage for code in tools/, a=testonly
authorSergio <svillar@igalia.com>
Mon, 23 Mar 2020 11:45:20 +0000
changeset 520532 844666f4740ef3da5c1bc5a447349805a8373522
parent 520531 6e24d752da2a9eaf897fa9002a9ac736fab6d3f6
child 520533 89b2dd9ad7249b730e7c38062b2673edcda56c35
push id37252
push usermalexandru@mozilla.com
push dateThu, 26 Mar 2020 15:34:27 +0000
treeherdermozilla-central@31360ced8ff8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1622848, 22278
milestone76.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 1622848 [wpt PR 22278] - Collect code coverage for code in tools/, a=testonly Automatic update from web-platform-tests Collect code coverage for code in tools/ (#22278) The coverage plugin was listed as dependency but not actually used. Let's start collecting code coverage data when running the tools/ unit tests. Gathering code coverage makes the tests run ~15% slower, so we should figure out how to integrate coverage data in CI or we will end up reverting the change. -- wpt-commits: a96048cfb0851383d7cc9e6d1e14d1cf318df56d wpt-pr: 22278
testing/web-platform/tests/tools/.coveragerc
testing/web-platform/tests/tools/tox.ini
--- a/testing/web-platform/tests/tools/.coveragerc
+++ b/testing/web-platform/tests/tools/.coveragerc
@@ -5,16 +5,19 @@ omit =
   html5lib/*
   py/*
   pytest/*
   pywebsocket/*
   six/*
   webdriver/*
   */site-packages/*
   */lib_pypy/*
+  wpt/*
+  wptrunner/*
+  */tests/*
 
 [paths]
 html5lib =
   html5lib/html5lib
   .tox/**/site-packages/html5lib
 
 pytest =
   pytest/_pytest
--- a/testing/web-platform/tests/tools/tox.ini
+++ b/testing/web-platform/tests/tools/tox.ini
@@ -10,17 +10,17 @@ deps =
   mock
   hypothesis
   requests
   taskcluster
   pyyaml
   json-e
   jsonschema
 
-commands = pytest {posargs}
+commands = pytest --cov=tools --cov-report=term {posargs}
 
 passenv =
   HYPOTHESIS_PROFILE
   PY_COLORS
   TASKCLUSTER_ROOT_URL
 
 [testenv:py27-flake8]
 deps = -rrequirements_flake8.txt