Switch tox unit test command to use ostestr

This commit switches the tox command to use ostestr instead of
calling testr through setup.py. This is inline with the all the
other OpenStack projects. It also removes requirements.txt from
tox.ini deps as that is redundant, as per:
http://lists.openstack.org/pipermail/openstack-dev/2015-July/069663.html

Change-Id: I8133d233f0fc0e1da2677d43d65056b9b070f867
This commit is contained in:
Debayan Ray 2016-03-17 05:20:21 -07:00
parent 78c74b09f1
commit a0b5470a52
2 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,6 @@
mock
hacking>=0.9.2,<0.10
testrepository>=0.0.18
testtools>=0.9.36,!=1.2.0
testtools>=1.4.0 # MIT
os-testr>=0.4.1 # Apache-2.0
ddt

15
tox.ini
View File

@ -1,15 +1,16 @@
[tox]
envlist = py27,pep8,py34
envlist = py34,py27,pep8
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
bash -c "TESTS_DIR=./proliantutils/tests/ python setup.py testr --slowest --testr-args='{posargs}'"
whitelist_externals = bash
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
TESTS_DIR=./proliantutils/tests/
deps = -r{toxinidir}/test-requirements.txt
commands = ostestr {posargs}
[testenv:pep8]
basepython = python2.7