From f348bfeb1852c3dc4717481194d80beece41bf0d Mon Sep 17 00:00:00 2001 From: Vu Cong Tuan Date: Thu, 12 Jul 2018 14:12:34 +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: I7eaadde83243afed1929bd29fff63272e58e072b --- .gitignore | 2 +- .stestr.conf | 4 ++++ .testr.conf | 12 ------------ tools/pretty_tox.sh | 6 ------ tox.ini | 2 +- 5 files changed, 6 insertions(+), 20 deletions(-) create mode 100644 .stestr.conf delete mode 100644 .testr.conf delete mode 100755 tools/pretty_tox.sh diff --git a/.gitignore b/.gitignore index a6a0b0b0..8c8997cd 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ build *.log .coverage .coverage.* -/.testrepository/* +.stestr/ .tox .venv cover diff --git a/.stestr.conf b/.stestr.conf new file mode 100644 index 00000000..90064061 --- /dev/null +++ b/.stestr.conf @@ -0,0 +1,4 @@ +[DEFAULT] +test_path=${OS_TEST_PATH:-./designate_tempest_plugin} +top_dir=./ + diff --git a/.testr.conf b/.testr.conf deleted file mode 100644 index fee97ebf..00000000 --- a/.testr.conf +++ /dev/null @@ -1,12 +0,0 @@ -[DEFAULT] -test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \ - OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \ - OS_LOG_CAPTURE=${OS_LOG_CAPTURE:-1} \ - OS_DEBUG=${OS_DEBUG:-1} \ - OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-500} \ - OS_TEST_LOCK_PATH=${OS_TEST_LOCK_PATH:-${TMPDIR:-'/tmp'}} \ - ${PYTHON:-python} -m subunit.run discover -t ${OS_TOP_LEVEL:-./} ${OS_TEST_PATH:-./designate_tempest_plugin} $LISTOPT $IDOPTION - -test_id_option=--load-list $IDFILE -test_list_option=--list -group_regex=([^\.]*\.)* diff --git a/tools/pretty_tox.sh b/tools/pretty_tox.sh deleted file mode 100755 index 0fc36053..00000000 --- a/tools/pretty_tox.sh +++ /dev/null @@ -1,6 +0,0 @@ -#! /bin/sh - -TESTRARGS=$1 - -exec 3>&1 -status=$(exec 4>&1 >&3; ( python setup.py testr --slowest --testr-args="--subunit $TESTRARGS"; echo $? >&4 ) | subunit-trace -f) && exit $status diff --git a/tox.ini b/tox.ini index f183956e..4d9c7df7 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ whitelist_externals = sh rm commands = find . -type f -name "*.pyc" -delete - sh tools/pretty_tox.sh '{posargs}' + stestr run {posargs} passenv = http_proxy HTTP_PROXY https_proxy