diff options
author | Witold Bedyk <witold.bedyk@est.fujitsu.com> | 2018-07-02 13:20:05 +0200 |
---|---|---|
committer | Witold Bedyk <witold.bedyk@est.fujitsu.com> | 2018-07-30 10:37:34 +0200 |
commit | 9586972ddd50fab9a4d0349d91f8dcb125193cb7 (patch) | |
tree | 27900f6a280375b758d28f1f159b7bb3798fdc07 /tox.ini | |
parent | a74978619ec8daa6a9b2aa2547e161694f31aca7 (diff) | |
download | ceilometer-9586972ddd50fab9a4d0349d91f8dcb125193cb7.tar.gz |
Migrate to stestr for running tests
stestr is recommended by OpenStack Project Testing Interface for running tests
[1]. This change migrates to stestr for running unit tests and coverage
job. Modified `cover` env allows running it as Zuul job and visualising
its results in Gerrit.
[1] https://governance.openstack.org/tc/reference/pti/python.html#python-test-running
Change-Id: I9e8b79d7a18cd36946daff10abb1a2f43b1aa3a1
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -10,19 +10,22 @@ deps = .[gnocchi,zaqar] install_command = pip install -U {opts} {packages} usedevelop = True setenv = VIRTUAL_ENV={envdir} - OS_TEST_PATH=ceilometer/tests/unit CEILOMETER_TEST_BACKEND={env:CEILOMETER_TEST_BACKEND:none} passenv = OS_TEST_TIMEOUT OS_STDOUT_CAPTURE OS_STDERR_CAPTURE OS_LOG_CAPTURE CEILOMETER_* commands = - {toxinidir}/tools/pretty_tox.sh "{posargs}" + stestr run {posargs} oslo-config-generator --config-file=etc/ceilometer/ceilometer-config-generator.conf whitelist_externals = bash [testenv:cover] basepython = python3 -setenv = OS_TEST_PATH=ceilometer/tests +setenv = + PYTHON=coverage run --source ceilometer --parallel-mode commands = - python setup.py testr --slowest --coverage --testr-args="{posargs}" + stestr run '{posargs}' + coverage combine + coverage html -d cover + coverage xml -o cover/coverage.xml [testenv:pep8] basepython = python3 |