Browse Source

Migrate to stestr and sphinx PTI commands

The PTI lists stestr as the test runner we're using now. Go ahead and
switch to it, as it simplifies many things.

Also, the PTI updated the sphinx commands, so update the docs env to
match what the gate will be doing.

Change-Id: I533468eb96e60c62dc06761aeb41b574dd640302
tags/13.0.0
Monty Taylor 1 year ago
parent
commit
7e6afb931f
5 changed files with 12 additions and 19 deletions
  1. 0
    4
      .testr.conf
  2. 1
    1
      networking_bigswitch/plugins/bigswitch/plugin.py
  3. 1
    1
      test-requirements.txt
  4. 0
    6
      tools/pretty_tox.sh
  5. 10
    7
      tox.ini

+ 0
- 4
.testr.conf View File

@@ -1,4 +0,0 @@
[DEFAULT]
test_command=OS_STDOUT_CAPTURE=1 OS_STDERR_CAPTURE=1 OS_LOG_CAPTURE=1 ${PYTHON:-python} -m subunit.run discover -t ./ ${OS_TEST_PATH:-./networking_bigswitch/tests/unit} $LISTOPT $IDOPTION
test_id_option=--load-list $IDFILE
test_list_option=--list

+ 1
- 1
networking_bigswitch/plugins/bigswitch/plugin.py View File

@@ -100,7 +100,7 @@ SYNTAX_ERROR_MESSAGE = _('Syntax error in server config file, aborting plugin')
METADATA_SERVER_IP = '169.254.169.254'


class AgentNotifierApi(sg_rpc.SecurityGroupAgentRpcApiMixin):
class AgentNotifierApi(securitygroups_rpc.SecurityGroupAgentRpcApiMixin):

def __init__(self, topic):
self.topic = topic

+ 1
- 1
test-requirements.txt View File

@@ -16,7 +16,6 @@ sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
oslosphinx>=2.2.0 # Apache-2.0
oslo.privsep>=1.9.0 # Apache-2.0
pyroute2==0.4.17 # Apache-2.0 (+ dual licensed GPL2)
testrepository>=0.0.18
testresources>=0.2.4 # Apache-2.0/BSD
testtools>=0.9.36,!=1.2.0
testscenarios>=0.4
@@ -25,3 +24,4 @@ oslotest>=1.2.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0
babel!=2.4.0,>=2.3.4
os-vif>=1.1.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0

+ 0
- 6
tools/pretty_tox.sh View File

@@ -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

+ 10
- 7
tox.ini View File

@@ -12,12 +12,10 @@ usedevelop = True
install_command = pip install -U {opts} {packages}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
whitelist_externals = sh
commands =
dsvm-functional: {toxinidir}/tools/deploy_rootwrap.sh {toxinidir} {envdir}/etc {envbindir}
sh tools/pretty_tox.sh '{posargs}'
# there is also secret magic in pretty_tox.sh which lets you run in a fail only
# mode. To do this define the TRACE_FAILONLY environmental variable.
stestr run {posargs}
stestr slowest

[testenv:functional]
deps =
@@ -30,7 +28,6 @@ deps =
# tox --hashseed 1235130571 -e hashtest
setenv = VIRTUAL_ENV={envdir}


[tox:jenkins]
sitepackages = True

@@ -41,14 +38,20 @@ commands =
whitelist_externals = sh

[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --source openstack --parallel-mode
commands =
python setup.py testr --coverage --testr-args='{posargs}'
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml

[testenv:venv]
commands = {posargs}

[testenv:docs]
commands = python setup.py build_sphinx
commands = sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html

[flake8]
# N530 direct neutron imports not allowed

Loading…
Cancel
Save