From 20871dad7ce0c7ae1b05d3b41baebf70134060ab Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 25 Jul 2014 21:26:21 -0400 Subject: [PATCH] Fix the coverage job in tox This commit fixes the coverage job in tox. It relies on pbr to actually make the coverage calls before and after running the tests. However, by default pbr assumes the project name in setup.cfg is the same as the directory containing the source. However that isn't the case here. This commits corrects this by using the flag to pretend that package name is the same as the source dir. This change also sets the correct regex for testr to run the unit tests only, which is what is needed for the coverage job. The pbr requirement is also updated to be >=0.8.1 because this is the min version required to use the option exploited by this patch. Change-Id: Icea30575538571fe842632901e994be3ac0bbc80 --- requirements.txt | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 0cc8e5cb..3d67396d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,7 +7,7 @@ python-daemon irc pyyaml lockfile -pbr>=0.6,!=0.7,<1.0 +pbr>=0.8.1,<1.0 Babel>=0.9.6 launchpadlib Jinja2 diff --git a/tox.ini b/tox.ini index 3bc149d5..545a31f0 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ commands = flake8 commands = {posargs} [testenv:cover] -commands = python setup.py testr --coverage --testr-args='{posargs}' +commands = python setup.py testr --coverage --coverage-package-name='elastic_recheck' --testr-args='{posargs} tests.unit' [testenv:run] # test to run the bot as a non voting foreground process