From 1a89c57d50c0e22d08dc0bc005f4001836e4da85 Mon Sep 17 00:00:00 2001 From: Yingxin Date: Sat, 8 Oct 2016 08:07:58 +0000 Subject: [PATCH] Fix testing with tox Corrected ignore file list for testr and tox; Corrected test command in tox; And added .testr.conf --- .gitignore | 2 ++ .testr.conf | 8 ++++++++ tox.ini | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index a4b1ebd..8fbef05 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ build/ *.pyc *.swp .venv +.testrepository +.tox diff --git a/.testr.conf b/.testr.conf new file mode 100644 index 0000000..975a461 --- /dev/null +++ b/.testr.conf @@ -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 diff --git a/tox.ini b/tox.ini index 1f9b76f..8b9ce12 100644 --- a/tox.ini +++ b/tox.ini @@ -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}