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: Ie726a4b47b3df701fffc27fda14573bd459d2fbe
This commit is contained in:
parent
5151adffe8
commit
23167b67b2
|
@ -29,7 +29,7 @@ develop-eggs/
|
|||
doc/source/api
|
||||
|
||||
#Testing framework
|
||||
.testrepository
|
||||
.stestr
|
||||
.coverage
|
||||
*,cover
|
||||
cover
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
[DEFAULT]
|
||||
test_path=${OS_TEST_PATH:-./qinlingclient/tests/unit}
|
||||
top_dir=./
|
||||
|
|
@ -1,7 +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:-60} \
|
||||
${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./qinlingclient/tests/unit} $LISTOPT $IDOPTION
|
||||
test_id_option=--load-list $IDFILE
|
||||
test_list_option=--list
|
|
@ -73,7 +73,7 @@ pytz==2013.6
|
|||
PyYAML==3.12
|
||||
reno==2.5.0
|
||||
requests==2.14.2
|
||||
requests-mock==1.1.0
|
||||
requests-mock==1.2.0
|
||||
requestsexceptions==1.2.0
|
||||
rfc3986==0.3.1
|
||||
simplejson==3.5.1
|
||||
|
@ -81,9 +81,8 @@ six==1.10.0
|
|||
snowballstemmer==1.2.1
|
||||
Sphinx==1.6.5
|
||||
sphinxcontrib-websupport==1.0.1
|
||||
stestr==1.0.0
|
||||
stevedore==1.20.0
|
||||
testrepository==0.0.18
|
||||
stestr==2.0.0
|
||||
testscenarios==0.4
|
||||
testtools==2.2.0
|
||||
traceback2==1.4.0
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# of appearance. Changing the order has an impact on the overall integration
|
||||
# process, which may cause wedges in the gate later.
|
||||
pbr!=2.1.0,>=2.0.0 # Apache-2.0
|
||||
PrettyTable<0.8,>=0.7.1 # BSD
|
||||
PrettyTable<0.8,>=0.7.2 # BSD
|
||||
python-keystoneclient>=3.8.0 # Apache-2.0
|
||||
python-openstackclient>=3.12.0 # Apache-2.0
|
||||
iso8601>=0.1.11 # MIT
|
||||
|
|
|
@ -7,7 +7,7 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
|||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
mock>=2.0.0 # BSD
|
||||
requests-mock>=1.2.0 # Apache-2.0
|
||||
testrepository>=0.0.18 # Apache-2.0/BSD
|
||||
stestr>=2.0.0 # Apache-2.0
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
testtools>=2.2.0 # MIT
|
||||
os-testr>=1.0.0 # Apache-2.0
|
||||
|
@ -15,5 +15,5 @@ oslotest>=3.2.0 # Apache-2.0
|
|||
|
||||
# doc build requirements
|
||||
oslosphinx>=4.7.0 # Apache-2.0
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
|
||||
sphinx!=1.6.6,!=1.6.7,>=1.6.5 # BSD
|
||||
reno>=2.5.0 # Apache-2.0
|
||||
|
|
|
@ -28,7 +28,11 @@ uncommitted=$(git status --porcelain | grep -v "^??")
|
|||
git checkout HEAD^
|
||||
|
||||
baseline_report=$(mktemp -t qinlingclient_coverageXXXXXXX)
|
||||
find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*"
|
||||
find . -type f -name "*.pyc" -delete
|
||||
stestr run "$*"
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report > $baseline_report
|
||||
baseline_missing=$(awk 'END { print $3 }' $baseline_report)
|
||||
|
||||
|
@ -38,7 +42,11 @@ git checkout -
|
|||
|
||||
# Generate and save coverage report
|
||||
current_report=$(mktemp -t qinlingclient_coverageXXXXXXX)
|
||||
find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*"
|
||||
find . -type f -name "*.pyc" -delete
|
||||
stestr run "$*"
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report > $current_report
|
||||
current_missing=$(awk 'END { print $3 }' $current_report)
|
||||
|
||||
|
@ -76,4 +84,4 @@ else
|
|||
fi
|
||||
|
||||
rm $baseline_report $current_report
|
||||
exit $exit_code
|
||||
exit $exit_code
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -o pipefail
|
||||
|
||||
TESTRARGS=$1
|
||||
python setup.py testr --slowest --testr-args="--subunit $TESTRARGS" | subunit-trace -f
|
11
tox.ini
11
tox.ini
|
@ -14,7 +14,7 @@ deps =
|
|||
-c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
|
||||
-r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
commands = bash tools/pretty_tox.sh '{posargs}'
|
||||
commands = stestr run {posargs}
|
||||
|
||||
[testenv:pep8]
|
||||
basepython = python3
|
||||
|
@ -30,9 +30,14 @@ setenv =
|
|||
|
||||
[testenv:cover]
|
||||
basepython = python3
|
||||
setenv =
|
||||
PYTHON=coverage run --source qinlingclient --parallel-mode
|
||||
commands =
|
||||
python setup.py testr --coverage --testr-args='{posargs}'
|
||||
coverage report
|
||||
stestr run '{posargs}'
|
||||
coverage combine
|
||||
coverage html -d cover
|
||||
coverage xml -o cover/coverage.xml
|
||||
coverage report
|
||||
|
||||
[testenv:docs]
|
||||
basepython = python3
|
||||
|
|
Loading…
Reference in New Issue