From 94fbee1ec876b56114b37e1ce32f044105273c56 Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Wed, 4 Jul 2018 14:27:42 +0700 Subject: [PATCH] Switch to stestr According to Openstack summit session [1], stestr is maintained project to which all Openstack projects should migrate. Let's switch to stestr as other projects have already moved to it. [1] https://etherpad.openstack.org/p/YVR-python-pti Change-Id: I255684ebe0c2d59c4141eeec12ac346bfcf477b2 --- .gitignore | 2 +- .stestr.conf | 3 +++ .testr.conf | 8 -------- test-requirements.txt | 2 +- tox.ini | 2 +- 5 files changed, 6 insertions(+), 11 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf diff --git a/.gitignore b/.gitignore index cf982251..9fabec9c 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ AUTHORS ChangeLog .projects*yaml .projects*.pkl -.testrepository +.stestr/ doc/source/archive_toc.rst doc/source/*/*.rst doc/source/ptl.rst diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..8e4f4d85 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,3 @@ +[DEFAULT] +test_path=./openstack_election/tests +top_dir=./ diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index b8ea5bce..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 ./ ${OS_TEST_PATH:-./openstack_election/tests} $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list diff --git a/test-requirements.txt b/test-requirements.txt index 2a35cc26..60900126 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -8,5 +8,5 @@ hacking<0.12,>=0.11.0 # Apache-2.0 yamllint mock>=2.0.0 # BSD oslotest>=1.10.0 # Apache-2.0 -testrepository>=0.0.18 # Apache-2.0/BSD +stestr>=2.0.0 # Apache-2.0 testresources>=2.0.0 # Apache-2.0/BSD diff --git a/tox.ini b/tox.ini index 149ed7c9..23455bcc 100644 --- a/tox.ini +++ b/tox.ini @@ -12,7 +12,7 @@ deps = -r{toxinidir}/requirements.txt # NOTE: If py35 fails with "db type could not be determined", delete # .testrepository and try again. Running py35 before py27 is OK, but not the # other way around. See: https://bugs.launchpad.net/testrepository/+bug/1212909 -commands = python setup.py testr --slowest --testr-args="{posargs}" +commands = stestr run --slowest {posargs} [testenv:linters] commands = yamllint configuration.yaml