Merge "Add a new tox environment to run unit tests in threading mode"
This commit is contained in:
@@ -297,6 +297,14 @@
|
|||||||
devstack_localrc:
|
devstack_localrc:
|
||||||
'SYSTEMD_ENV_VARS["watcher-decision-engine"]': OS_WATCHER_DISABLE_EVENTLET_PATCHING=true
|
'SYSTEMD_ENV_VARS["watcher-decision-engine"]': OS_WATCHER_DISABLE_EVENTLET_PATCHING=true
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: openstack-tox-py312-threading
|
||||||
|
parent: openstack-tox-py312
|
||||||
|
description: |
|
||||||
|
Run tox with the py3-threading environment.
|
||||||
|
vars:
|
||||||
|
tox_envlist: py3-threading
|
||||||
|
|
||||||
- project:
|
- project:
|
||||||
queue: watcher
|
queue: watcher
|
||||||
templates:
|
templates:
|
||||||
@@ -307,6 +315,7 @@
|
|||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
check:
|
check:
|
||||||
jobs:
|
jobs:
|
||||||
|
- openstack-tox-py312-threading
|
||||||
- watcher-tempest-functional
|
- watcher-tempest-functional
|
||||||
- watcher-grenade
|
- watcher-grenade
|
||||||
- watcher-tempest-strategies
|
- watcher-tempest-strategies
|
||||||
|
|||||||
10
tox.ini
10
tox.ini
@@ -37,6 +37,16 @@ passenv =
|
|||||||
# debugging issue with fixtures and mocks.
|
# debugging issue with fixtures and mocks.
|
||||||
PYTHONOPTIMIZE
|
PYTHONOPTIMIZE
|
||||||
|
|
||||||
|
[testenv:py3-threading]
|
||||||
|
setenv =
|
||||||
|
OS_WATCHER_DISABLE_EVENTLET_PATCHING=true
|
||||||
|
commands =
|
||||||
|
rm -f .testrepository/times.dbm
|
||||||
|
find . -type f -name "*.py[c|o]" -delete
|
||||||
|
# NOTE(dviroel): Applier still requires changes to support
|
||||||
|
# threading mode
|
||||||
|
stestr run {posargs} --exclude-regex 'applier'
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
description =
|
description =
|
||||||
Run style checks.
|
Run style checks.
|
||||||
|
|||||||
@@ -21,6 +21,13 @@
|
|||||||
from watcher import eventlet
|
from watcher import eventlet
|
||||||
eventlet.patch()
|
eventlet.patch()
|
||||||
|
|
||||||
|
# NOTE(dviroel): oslo service backend needs to be initialize
|
||||||
|
# as soon as possible, before importing oslo service. If eventlet
|
||||||
|
# patching is enabled, it should be patched before calling this
|
||||||
|
# function
|
||||||
|
from watcher.common import oslo_service_helper as helper # noqa E402
|
||||||
|
helper.init_oslo_service_backend()
|
||||||
|
|
||||||
from watcher import objects # noqa E402
|
from watcher import objects # noqa E402
|
||||||
|
|
||||||
# NOTE(comstud): Make sure we have all of the objects loaded. We do this
|
# NOTE(comstud): Make sure we have all of the objects loaded. We do this
|
||||||
|
|||||||
Reference in New Issue
Block a user