From 70556d2bf483bb968f0121dece03325826ec4da9 Mon Sep 17 00:00:00 2001 From: HeroicHitesh Date: Tue, 18 May 2021 12:17:06 +0530 Subject: [PATCH] Migrate from testr to stestr * Replace .testr.conf by .stestr.conf for migration and update .gitignore and test-requirements.txt files accordingly * Use 3.18.0 as the minversion for tox Signed-off-by: HeroicHitesh Change-Id: I2bb0f23771e6ff1e3f775520a719514c2a3f3aa3 --- .gitignore | 17 +++++++++++++---- .stestr.conf | 3 +++ .testr.conf | 4 ---- test-requirements.txt | 2 +- tox.ini | 6 +++--- 5 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index 8022a86b..f78a2d7a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,16 @@ -heat_specs.egg-info/ -doc/build/ -.tox/ *.pyc -.testrepository + +# Packages +*.egg* + +# Unit test +.stestr/ +.tox/ +.venv + +# Sphinx +doc/build/ + +# pbr generates these AUTHORS ChangeLog 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 1641f86e..00000000 --- a/.testr.conf +++ /dev/null @@ -1,4 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_TEST_TIMEOUT=60 ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index 5bd8d4bd..ebcf1cf9 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,3 +1,3 @@ -testrepository>=0.0.18 +stestr>=2.0.0 # Apache-2.0 testtools>=0.9.34 testscenarios>=0.4 diff --git a/tox.ini b/tox.ini index 97853947..7f768f57 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -minversion = 1.6 +minversion = 3.18.0 envlist = docs,pep8 skipsdist = True @@ -10,10 +10,10 @@ setenv = VIRTUAL_ENV={envdir} deps = -r{toxinidir}/requirements.txt -r{toxinidir}/test-requirements.txt -whitelist_externals = find +allowlist_externals = find commands = find . -type f -name "*.pyc" -delete - python setup.py testr --slowest --testr-args='{posargs}' + stestr run --slowest {posargs} [testenv:venv] commands = {posargs}