Add job for running unit tests

Change-Id: I333b1f168314e73e9b0470041a16c0297b2cd562
This commit is contained in:
Hongbin Lu 2018-10-09 21:23:57 +00:00
parent 08c6200955
commit 78cd06b76a
4 changed files with 10 additions and 10 deletions

View File

@ -1,7 +1,5 @@
- project:
check:
jobs:
- openstack-tox-pep8
gate:
jobs:
- openstack-tox-pep8
templates:
- openstack-python-jobs
- openstack-python35-jobs
- openstack-python36-jobs

View File

@ -29,7 +29,7 @@ from os_ken import log
log.early_init_log(logging.DEBUG)
from os_ken import flags
from os_ken import version
from os_ken import __version__ as version
from os_ken.app import wsgi
from os_ken.base.app_manager import AppManager
from os_ken.controller import controller

View File

@ -28,8 +28,7 @@ LOG = logging.getLogger(__name__)
MOD_DIR = os.path.dirname('file://' + sys.modules[__name__].__file__)
_RYU_REQUIREMENTS_FILES = [
'../../../tools/pip-requires',
'../../../tools/optional-requires',
'../../../requirements.txt',
]
RYU_REQUIREMENTS_FILES = [
os.path.join(MOD_DIR, f) for f in _RYU_REQUIREMENTS_FILES]

View File

@ -13,7 +13,10 @@ setenv =
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs}
# TODO(hongbin): this is the way Ryu runs unit tests and we inherit
# this approach as a start. In the future, we should migrate to stestr
# for consistency with other OpenStack projects.
commands = python ./os_ken/tests/run_tests.py {posargs}
[testenv:pep8]
basepython = python3