Fix testing with tox

Corrected ignore file list for testr and tox; Corrected test command in
tox; And added .testr.conf
This commit is contained in:
Yingxin 2016-10-08 08:07:58 +00:00
parent 8b97392c82
commit 1a89c57d50
3 changed files with 11 additions and 1 deletions

2
.gitignore vendored
View File

@ -3,3 +3,5 @@ build/
*.pyc
*.swp
.venv
.testrepository
.tox

8
.testr.conf Normal file
View File

@ -0,0 +1,8 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./os_traits/tests} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@ -11,7 +11,7 @@ install_command =
setenv =
VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/test-requirements.txt
commands = python setup.py test --slowest --testr-args='{posargs}'
commands = python setup.py testr --slowest --testr-args='{posargs}'
[testenv:common-constraints]
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}