Regression introduced in 1031ead7 wrt `[run]omit` and reporting

Issue #648 closed
Anthony Sottile
created an issue

Now to be honest, my repository here is a_bit_ of a special snowflake so it's entirely possible this is somehow my fault -- though this has been working well for quite some time (the oldest build I can find succeeding is against coverage 4.0.3 (two years and one day ago)).

I have not yet tried reducing the problem to a MCVE but I can assist in that if it's helpful :)

The repository in question is https://github.com/asottile/setuptools-golang

During some routine automated maintenance my builds began to fail -- now showing missing coverage for setup.py (which is in my [run]omit so it should never be traced at all).

A few things of note for this particular repository. It is leveraging coverage-enable-subprocess (thanks @Buck Evan!) to automatically trace subprocesses.

I bisected (using the github git mirror) using the following script and commands:

#!/usr/bin/env bash
set -euxo pipefail

cd ../setuptools-golang

# virtualenv .tox/py36 && .tox/py36/bin/pip install -r requirements-dev.txt
VENV=".tox/py36/bin"
test -e "$VENV/python"

"$VENV/pip" uninstall -y coverage || true

"$VENV/pip" install ../coveragepy

export TOP="$PWD"
"$VENV/coverage" erase
"$VENV/coverage" run -m pytest tests
"$VENV/coverage" combine
"$VENV/coverage" report --show-missing --fail-under 100 || exit 1
git bisect start
git bisect good coverage-4.4.2
git bisect bad coverage-4.5.1 
git bisect run ./test.sh

The end of the log appears as follows:

...

+ .tox/py36/bin/coverage report --show-missing --fail-under 100
Name                              Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------------------
setup.py                              2      2      0      0     0%   1-4
setuptools_golang.py                 71      0     13      0   100%
tests/__init__.py                     0      0      0      0   100%
tests/setuptools_golang_test.py      67      0      2      0   100%
-----------------------------------------------------------------------------
TOTAL                               140      2     15      0    99%
+ exit 1

...

25c7c9c0133bc21da53aa41baae0442360d727d1 is the first bad commit
commit 25c7c9c0133bc21da53aa41baae0442360d727d1
Author: Ned Batchelder <ned@nedbatchelder.com>
Date:   Sat Jan 20 21:24:10 2018 -0500

    Don't confuse run-include with report-include (and also omit). Fixes #621 and #622.

:100644 100644 51a0019d625fdfa5e8140aafe0b16a413baf27cc c4ec5bf4ff1185c8155741969260a72ef58d9ef2 M  CHANGES.rst
:100644 100644 6c6bcd0bb8937ba751223c226c8e9e90031356ef 953512a639f3830ed0fdcc47434d38afa5c1c3f1 M  CONTRIBUTORS.txt
:040000 040000 5c5f6cf49a7f1f3cd1091efb1a7830e625533e7d 0bd7dbb72ab9bfdfa2c51ae21a7a52b8298464f3 M  coverage
:040000 040000 bef2dabb78d49c51f0cef67c667b7add3e877c5b 027d18959e216ed2c4afc15ab65807096606083a M  tests
bisect run success

This is the commit in question: https://bitbucket.org/ned/coveragepy/commits/1031ead7ca4ccb98c95dda3a9c2c99167ccbd99f

Comments (2)

  1. Log in to comment