2
0
mirror of https://opendev.org/x/pyghmi synced 2025-08-24 20:10:20 +00:00

Merge "Switch to stestr"

This commit is contained in:
Zuul
2018-08-10 13:28:35 +00:00
committed by Gerrit Code Review
7 changed files with 26 additions and 16 deletions

7
.coveragerc Normal file
View File

@@ -0,0 +1,7 @@
[run]
branch = True
source = pyghmi
omit = pyghmi/tests/*
[report]
ignore_errors = True

3
.stestr.conf Normal file
View File

@@ -0,0 +1,3 @@
[DEFAULT]
test_path=${TESTS_DIR:-./pyghmi/tests/unit/}
top_dir=./

View File

@@ -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:-60} \
${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

View File

@@ -2,9 +2,8 @@ coverage===4.0
cryptography===2.1
fixtures===3.0.0
oslotest===3.2.0
os-testr===1.0.0
python-subunit===1.0.0
Sphinx===1.6.5
testrepository===0.0.18
stestr==1.0.0
testscenarios===0.4
testtools===2.2.0

View File

@@ -1 +1 @@
cryptography!=2.0 # BSD/Apache-2.0
cryptography>=2.1 # BSD/Apache-2.0

View File

@@ -3,8 +3,7 @@ coverage>=4.0
fixtures>=3.0.0
python-subunit>=1.0.0
sphinx>=1.6.5
testrepository>=0.0.18
stestr>=1.0.0 # Apache-2.0
testscenarios>=0.4
testtools>=2.2.0
os-testr>=1.0.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0

16
tox.ini
View File

@@ -1,4 +1,5 @@
[tox]
minversion = 2.8.1
envlist = py35,py27,pep8
[testenv]
@@ -7,9 +8,13 @@ setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US:en
LC_ALL=C
TESTS_DIR=./pyghmi/tests/unit/
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = ostestr {posargs}
commands = stestr run {posargs}
stestr slowest
[tox:jenkins]
sitepackages = True
@@ -20,9 +25,14 @@ whitelist_externals = bash
[testenv:cover]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
setenv =
{[testenv]setenv}
PYTHON=coverage run --source pyghmi --parallel-mode
commands =
python setup.py testr --coverage
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:venv]
basepython = python3