From 1e3b5a1cd4932c0897bff9359bfd5576865cd5a2 Mon Sep 17 00:00:00 2001 From: HeroicHitesh Date: Mon, 12 Jul 2021 20:20:25 +0530 Subject: [PATCH] Migrate from testr to stestr * Replace .testr.conf by .stestr.conf for migration and update .gitignore, tox.ini and test-requirements.txt files accordingly * Use py3 as the default runtime for tox Signed-off-by: HeroicHitesh Change-Id: Ibeb39fd9293ad037b038857507eeb498856036e3 --- .gitignore | 15 ++++++++++++--- .stestr.conf | 3 +++ .testr.conf | 8 -------- test-requirements.txt | 2 +- tox.ini | 3 +-- 5 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index 19be48e0..c394c857 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,22 @@ -*~ -.testrepository -*.sw? *.pyc + +# Unit test / coverage reports +.stestr .tox +.venv + +# Packages *.egg-info dist build + +# pbr generates these AUTHORS ChangeLog +# Editors +*.sw? +*~ + # Files created by releasenotes build releasenotes/build diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..c2c8a3a5 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./tests/ +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index d3026e87..00000000 --- a/.testr.conf +++ /dev/null @@ -1,8 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \ - ${PYTHON:-python} -m subunit.run discover -t ./ ./tests $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index abd86cf5..837159f5 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -5,4 +5,4 @@ hacking>=3.0.1,<3.1.0 # Apache-2.0 oslotest -testrepository>=0.0.18 +stestr>=2.0.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index 61f1c8b7..62e5d071 100644 --- a/tox.ini +++ b/tox.ini @@ -11,8 +11,7 @@ deps = -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -commands= - python setup.py testr --slowest --testr-args='{posargs}' +commands = stestr run --slowest {posargs} [testenv:venv] commands = {posargs}