'tox -e cover' fails

Bug #1703177 reported by Frank Zdarsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
os-net-config
Fix Released
Low
Frank Zdarsky

Bug Description

'tox -e cover' fails, as the testr option "--coverage-package-name" is not recognized. As a result, the Jenkins job "os-net-config-coverage-ubuntu-xenial-nv" fails (see example log below).

This seems to be a known issue [0] and a work-around would be to use `test` instead of `testr` for [testenv:cover].

[0] https://bugs.launchpad.net/neutron/+bug/1454772

---
Example log of failed os-net-config-coverage-ubuntu-xenial-nv run:

2017-07-06 19:53:38.761484 | + tox -ecover
2017-07-06 19:53:38.917023 | cover create: /home/jenkins/workspace/os-net-config-coverage-ubuntu-xenial-nv/.tox/cover
2017-07-06 19:53:40.624119 | cover installdeps: -r/home/jenkins/workspace/os-net-config-coverage-ubuntu-xenial-nv/requirements.txt, -r/home/jenkins/workspace/os-net-config-coverage-ubuntu-xenial-nv/test-requirements.txt
2017-07-06 19:53:51.230190 | cover develop-inst: /home/jenkins/workspace/os-net-config-coverage-ubuntu-xenial-nv
2017-07-06 19:53:55.478658 | cover installed: alabaster==0.7.10,anyjson==0.3.3,Babel==2.3.4,certifi==2017.4.17,chardet==3.0.4,coverage==4.4.1,debtcollector==1.15.0,docutils==0.13.1,enum-compat==0.0.2,enum34==1.1.6,eventlet==0.21.0,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.2.4,funcsigs==1.0.2,functools32==3.2.3.post2,greenlet==0.4.12,hacking==0.10.3,idna==2.5,imagesize==0.7.1,iso8601==0.1.11,Jinja2==2.9.6,jsonschema==2.6.0,linecache2==1.0.0,MarkupSafe==1.0,mccabe==0.2.1,mock==2.0.0,monotonic==1.3,mox==0.5.3,netaddr==0.7.19,netifaces==0.10.6,-e git+http://zm05.openstack.org/p/openstack/os-net-config@719efed7d5284c98b3e438b185df2e3f75cbdfdc#egg=os_net_config,oslo.concurrency==3.20.0,oslo.config==4.7.0,oslo.i18n==3.15.3,oslo.utils==3.26.0,oslosphinx==4.15.0,pbr==3.1.1,pep8==1.5.7,pyflakes==0.8.1,Pygments==2.2.0,pyparsing==2.2.0,python-mimeparse==1.6.0,python-subunit==1.2.0,pytz==2017.2,PyYAML==3.12,requests==2.18.1,rfc3986==1.0.0,six==1.10.0,snowballstemmer==1.2.1,Sphinx==1.6.3,sphinxcontrib-websupport==1.0.1,stevedore==1.23.0,testrepository==0.0.20,testscenarios==0.5.0,testtools==2.3.0,traceback2==1.4.0,typing==3.6.1,unittest2==1.1.0,urllib3==1.21.1,wrapt==1.10.10
2017-07-06 19:53:55.478743 | cover runtests: PYTHONHASHSEED='2206352018'
2017-07-06 19:53:55.478779 | cover runtests: commands[0] | python setup.py testr --coverage --coverage-package-name=os_net_config --testr-args=
2017-07-06 19:53:55.860736 | usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
2017-07-06 19:53:55.860791 | or: setup.py --help [cmd1 cmd2 ...]
2017-07-06 19:53:55.860806 | or: setup.py --help-commands
2017-07-06 19:53:55.860819 | or: setup.py cmd --help
2017-07-06 19:53:55.860825 |
2017-07-06 19:53:55.860841 | error: option --coverage-package-name not recognized
2017-07-06 19:53:55.879810 | ERROR: InvocationError: '/home/jenkins/workspace/os-net-config-coverage-ubuntu-xenial-nv/.tox/cover/bin/python setup.py testr --coverage --coverage-package-name=os_net_config --testr-args='

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to os-net-config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/481903

Changed in os-net-config:
assignee: nobody → Frank Zdarsky (frank-zdarsky)
status: New → In Progress
Ben Nemec (bnemec)
Changed in os-net-config:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-net-config (master)

Reviewed: https://review.openstack.org/481903
Committed: https://git.openstack.org/cgit/openstack/os-net-config/commit/?id=bb3a4bfce81cb7c9cf90ca1e697ee1ac6dfdcc1e
Submitter: Jenkins
Branch: master

commit bb3a4bfce81cb7c9cf90ca1e697ee1ac6dfdcc1e
Author: Frank A. Zdarsky <email address hidden>
Date: Sun Jul 9 11:15:41 2017 +0200

    Fix 'tox -e cover'

    'tox -e cover' fails as --coverage-package-name option for 'testr' is
    not recognized. A work-around proposed by Infra team (see
    https://bugs.launchpad.net/neutron/+bug/1454772) is to replace 'testr'
    with 'test'.

    This patch implements this change and adds the cover/ directory to
    .gitignore.

    Change-Id: I659445ea479ea80a4f21d6ebca896abb4fb104f2
    Closes-Bug: #1703177

Changed in os-net-config:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-net-config 7.2.0

This issue was fixed in the openstack/os-net-config 7.2.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.