diff --git a/.testr.conf b/.testr.conf index 80269e12b..984a59737 100644 --- a/.testr.conf +++ b/.testr.conf @@ -1,5 +1,5 @@ [DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./ironicclient/tests/unit} $LISTOPT $IDOPTION +test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} ${PYTHON:-python} -m subunit.run discover -t ./ ${TESTS_DIR:-./ironicclient/tests/unit} $LISTOPT $IDOPTION test_id_option=--load-list $IDFILE test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index 97b9fe598..36863c791 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -13,6 +13,6 @@ oslosphinx!=3.4.0,>=2.5.0 # Apache-2.0 oslotest>=1.10.0 # Apache-2.0 python-subunit>=0.0.18 sphinx!=1.2.0,!=1.3b1,<1.3,>=1.1.2 -testrepository>=0.0.18 testtools>=1.4.0 tempest-lib>=0.11.0 +os-testr>=0.4.1 diff --git a/tox.ini b/tox.ini index a83031d22..f24701a3c 100644 --- a/tox.ini +++ b/tox.ini @@ -6,13 +6,15 @@ skipsdist = True [testenv] setenv = VIRTUAL_ENV={envdir} LANGUAGE=en_US + # .testr.conf uses TESTS_DIR + TESTS_DIR=./ironicclient/tests/unit usedevelop = True install_command = pip install -U {opts} {packages} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt commands = - python setup.py testr --slowest --testr-args='{posargs}' + ostestr {posargs} [testenv:pep8] commands = @@ -29,7 +31,7 @@ commands = commands = {posargs} [testenv:functional] -setenv = OS_TEST_PATH=./ironicclient/tests/functional +setenv = TESTS_DIR=./ironicclient/tests/functional LANGUAGE=en_US [flake8]