tox -e cover returns "error: option --coverage not recognized"

Bug #1809230 reported by Dinesh Bhor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
masakari
Fix Released
High
Neha Alhat

Bug Description

Recently a patch [1] got merged which remove the dependency on the 'testrepository' library.
Now on master if you try to run 'tox -e cover' it fails with below error:

# tox -e cover
cover create: /home1/masakari/.tox/cover
cover installdeps: -r/home1/irteamsu/masakari/test-requirements.txt
cover develop-inst: /home1/irteamsu/masakari
cover installed: alabaster==0.7.12,alembic==1.0.5,amqp==2.3.2,appdirs==1.4.3,asn1crypto==0.24.0,automaton==1.15.0,Babel==2.6.0,cachetools==3.0.0,certifi==2018.11.29,cffi==1.11.5,chardet==3.0.4,cliff==2.14.0,cmd2==0.8.9,contextlib2==0.5.5,coverage==4.5.2,cryptography==2.4.2,ddt==1.2.0,debtcollector==1.20.0,decorator==4.3.0,dnspython==1.16.0,docutils==0.14,dogpile.cache==0.6.8,dulwich==0.19.9,enum34==1.1.6,eventlet==0.24.1,extras==1.0.0,fasteners==0.14.1,fixtures==3.0.0,flake8==2.5.5,funcsigs==1.0.2,functools32==3.2.3.post2,future==0.17.1,futures==3.2.0,futurist==1.8.0,greenlet==0.4.15,hacking==0.12.0,idna==2.8,imagesize==1.1.0,ipaddress==1.0.22,iso8601==0.1.12,Jinja2==2.10,jmespath==0.9.3,jsonpatch==1.23,jsonpointer==2.0,jsonschema==2.6.0,keystoneauth1==3.11.2,keystonemiddleware==5.3.0,kombu==4.2.2,linecache2==1.0.0,Mako==1.0.7,MarkupSafe==1.1.0,-e git+https://github.com/openstack/masakari.git@4808a2a3d32b764b3bbb55df545b2a72b69f1ccd#egg=masakari,mccabe==0.2.1,microversion-parse==0.2.1,mock==2.0.0,monotonic==1.5,mox3==0.26.0,msgpack==0.6.0,munch==2.3.2,netaddr==0.7.19,netifaces==0.10.7,networkx==2.2,openstackdocstheme==1.28.0,openstacksdk==0.21.0,os-api-ref==1.6.0,os-client-config==1.31.2,os-service-types==1.4.0,oslo.cache==1.31.2,oslo.concurrency==3.29.0,oslo.config==6.7.0,oslo.context==2.22.0,oslo.db==4.42.0,oslo.i18n==3.23.0,oslo.log==3.42.1,oslo.messaging==9.3.0,oslo.middleware==3.37.0,oslo.policy==1.43.1,oslo.serialization==2.28.1,oslo.service==1.33.0,oslo.upgradecheck==0.1.1,oslo.utils==3.39.0,oslo.versionedobjects==1.34.1,oslosphinx==4.18.0,oslotest==3.7.0,packaging==18.0,Paste==3.0.5,PasteDeploy==2.0.1,pbr==5.1.1,pep8==1.5.7,prettytable==0.7.2,psycopg2==2.7.6.1,pycadf==2.8.0,pycparser==2.19,pydot==1.4.1,pyflakes==0.8.1,Pygments==2.3.1,pyinotify==0.9.6,PyMySQL==0.9.2,pyparsing==2.3.0,pyperclip==1.7.0,python-dateutil==2.7.5,python-editor==1.0.3,python-keystoneclient==3.18.0,python-mimeparse==1.6.0,python-novaclient==11.1.0,python-subunit==1.3.0,pytz==2018.7,PyYAML==3.13,reno==2.11.2,repoze.lru==0.7,requests==2.21.0,requests-mock==1.5.2,requestsexceptions==1.4.0,rfc3986==1.2.0,Routes==2.4.1,simplejson==3.16.0,six==1.12.0,snowballstemmer==1.2.1,Sphinx==1.8.2,sphinxcontrib-websupport==1.1.0,SQLAlchemy==1.2.15,sqlalchemy-migrate==0.11.0,sqlparse==0.2.4,statsd==3.3.0,stestr==2.2.0,stevedore==1.30.0,subprocess32==3.5.3,taskflow==3.3.1,Tempita==0.5.2,tenacity==5.0.2,testresources==2.0.1,testscenarios==0.5.0,testtools==2.3.0,traceback2==1.4.0,typing==3.6.6,unicodecsv==0.14.1,unittest2==1.1.0,urllib3==1.24.1,vine==1.1.4,voluptuous==0.11.5,wcwidth==0.1.7,WebOb==1.8.4,wrapt==1.10.11
cover run-test-pre: PYTHONHASHSEED='2885261394'
cover runtests: commands[0] | python setup.py test --coverage --testr-args=
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --coverage not recognized

If you revert the changes done in the below commit [1] and refresh to tox environment the 'tox -e cover' command succeeds.

[1]
https://github.com/openstack/masakari/commit/b0785c6630d19d93e33df8e1058b844bba420550

Revision history for this message
Dinesh Bhor (dinesh-bhor) wrote :

May be we need these changes:
https://review.openstack.org/#/c/604667/2

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

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

Changed in masakari:
assignee: nobody → Neha Alhat (nehaalhat)
status: New → In Progress
Tushar Patil (tpatil)
Changed in masakari:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to masakari (master)

Reviewed: https://review.openstack.org/629759
Committed: https://git.openstack.org/cgit/openstack/masakari/commit/?id=8373138dd71ab8f1b29e64692b753d99d83e3377
Submitter: Zuul
Branch: master

commit 8373138dd71ab8f1b29e64692b753d99d83e3377
Author: openstack <email address hidden>
Date: Thu Jan 10 04:09:06 2019 +0000

    Update coverage environment and use template for cover

    After switch to using stestr, testrepository is unnecessary
    and it is removed in patch[1]. After patch[1] got merged
    tox -e cover returns "error: option --coverage not recognized".

    In this patch fixed coverage environment to default stestr setup.
    Also used openstack-tox-cover template, this runs the cover job
    in the check queue only.

    [1]: https://review.openstack.org/#/c/581686/
    Closes-Bug: #1809230

    Change-Id: I77a295a64e2c4d128a6772e400c0968f40d11c1d

Changed in masakari:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/masakari 7.0.0.0rc1

This issue was fixed in the openstack/masakari 7.0.0.0rc1 release candidate.

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.