Commit Graph

14 Commits

Author SHA1 Message Date
Stephen Finucane 113685e1b9 Deprecate testr and nose integration
These are not recommended for use in OpenStack anymore and both nose and
testr offer native setuptools commands that can be manually aliased to
'test' on a per-project basis if necessary. Deprecate with an eye to
removal in the future.

Change-Id: I753f2ffe8b223b180b8ed813d879b3a28b47a1ab
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2018-01-03 15:10:14 +00:00
Jenkins f377238903 Merge "Remove testr entry point" 2017-03-27 23:12:29 +00:00
Ian Wienand 73ca7e086b Also generate XML coverage report
When using --coverage, also generate a machine-readable XML coverage
report.  This is useful to build tooling around automated tracking of
coverage results.

Change-Id: Idd54ecc627896cc5eab4903658f10a344bdb1778
2017-03-02 15:42:52 +11:00
Ian Wienand e3ad98ca19 Remove testr entry point
A "testr" entry-point was added to PBR in
I2227adf3643ffe6bcece0c7d2127d23e20d52f7a in Jun 2013.  However,
testrepository had already started providing this same
disutils.commands entry-point in Jan 2013 [1].

I am not sure if it is deterministic who wins when two packages
declare the same entry-point, but at least for me, running "python
setup.py testr ..." was not calling into any of the pbr hooks.  I
discovered this because I wanted to use the --coverage-package-name
argument provided by the pbr testr wrapper because to s/-/_ in dib.

The original change (I8e4bc9bb78be37b4d13f8d6c2edfe2d67554ad78)
overrides the setuptools provided "test" [2] to call testrepository
when it sees a .testr.conf file (falling back to nose for
compatability).  So it seems the intention was not to add a "testr"
command, but that "test" is overridden to run testr automatically when
available.

Therefore I think that testrepository owns the distutils.command
entry-point for "testr".  To avoid confusion we should remove the
duplicate entry-point here and just leave the "test" command
overrides.

I've added documentation on the test command.  The testr/test split is
quite confusing, being only one letter different, so that is called
out explicitly.  Comments in testr_command are updated to reflect
what's happening better.  This also converts the calls in tox.ini to
use the PBR wrapper "test".

[1] 2a36806c69 (diff-2eeaed663bd0d25b7e608891384b7298R96)
[2] https://github.com/pypa/setuptools/blob/master/setuptools/command/test.py

Change-Id: I5b68f03e782fef5c45424c04cc851be5988f9019
2017-02-24 11:30:09 +11:00
Thomas Morin 30962137f9 coverage package name option, doc improvement
The --coverage-package-name allows to specify
multiple packages. This change updates the doc to
reflect that.

Change-Id: Id9cfedf699c3e15b7e1c7b20531488682775462a
2016-10-18 16:51:58 +02:00
Akihiro Motoki 946cf80b75 Make setup.py --help-commands work without testrepository
testr command is registered by pbr.hooks.commands if
testrepository is installed, so there is no need to
setup the entry point in setup.cfg.

Change-Id: I95aae12d1ac810b6d1d09b71f2a0d87be5ccb6ab
Closes-Bug: #1375048
2015-05-21 08:10:00 +09:00
Christian Berendt b077c056e3 Bump hacking to 0.9.x series
Ignore H904 because it's a deprecated hacking check.
Ignore H405 because it should be fixed with a separate patch.

Change-Id: I2e3bf41474cead1a860810886791e025139cca3b
2014-07-22 14:22:57 +02:00
Steve Kowalik 715c59738e Register testr as a distutil entry point
pbr contains a testr distutil command, but since it isn't registered
as an entry-point, it won't get used. Also drive-by a fix to
coverage, where we go to the trouble of setting a variable, and then
not using it.

Change-Id: I2227adf3643ffe6bcece0c7d2127d23e20d52f7a
2014-06-11 16:31:15 +10:00
Marc Abramowitz 54d1191a87 pbr/testr_command.py: Add logging
to aid in debugging and testing.

Change-Id: I5342604204602623cdb5c0f2623d85f7d44e2b50
2014-05-05 22:15:45 -07:00
Marc Abramowitz d68a321265 Make source configurable when using --coverage
Change-Id: If5cd9e517d66322027408a59fd99015c91181db8
Closes-bug: #1310008
2014-04-25 20:21:47 -07:00
Matthew Treinish 91caceed9c Add option to run testr serially
This commit adds a new serial option to testr_command.py that when
set will run testr serially instead of running testr with the
'--parallel' flag.

Change-Id: Id49b105dc921e9acdef1a94d933719ad3a772c81
2013-08-06 15:50:43 -04:00
Monty Taylor 746b78d637 Clean up hacking and path issues with d2to1
We imported in another code base. It takes a little bit of path
adjusting to get things right.

Change-Id: Ifb96652c822d5d243a6bedb77bc34e919be2d3a8
2013-07-11 15:02:12 -04:00
Julien Danjou ce11c732ac testr: fix Python 3 compatibility
Change-Id: Id6d15638277433f202857d2541e727b2b534c99c
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-07-05 14:40:35 +02:00
Monty Taylor 04316feeb9 Make python setup.py test do the right thing.
As a step towards a common interface to running tests even when we're
not in the virtualenv - make python setup.py test actually be useful.

Change-Id: I8e4bc9bb78be37b4d13f8d6c2edfe2d67554ad78
2013-06-17 19:14:36 -04:00