Provide env settings to allow zuul and developers to both run tox
Zuul checks out the dependant projects by their repo names. Repo checks out the project directory structure based on the labels in the manifest. Currently these directories have different names and so tox passes when run by zuul, but fails when run in a developer env. This submission uses an env variable: "STX_PREFIX" to make both envs able to run tox. Story: 2004515 Task: 30664 Change-Id: I06cefab7422f53ccc0b8af30ca06945311cec70e Signed-off-by: Al Bailey <Al.Bailey@windriver.com>
This commit is contained in:
parent
f61784180d
commit
65eaf645f4
20
.zuul.yaml
20
.zuul.yaml
@ -57,6 +57,8 @@
|
||||
files:
|
||||
- sysinv/sysinv/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: py27
|
||||
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
||||
|
||||
@ -73,6 +75,8 @@
|
||||
files:
|
||||
- sysinv/sysinv/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: py35
|
||||
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
||||
|
||||
@ -84,6 +88,8 @@
|
||||
files:
|
||||
- sysinv/sysinv/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: flake8
|
||||
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
||||
|
||||
@ -99,6 +105,8 @@
|
||||
files:
|
||||
- sysinv/sysinv/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: pylint
|
||||
tox_extra_args: -c sysinv/sysinv/sysinv/tox.ini
|
||||
|
||||
@ -109,6 +117,8 @@
|
||||
files:
|
||||
- controllerconfig/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: flake8
|
||||
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
|
||||
|
||||
@ -122,6 +132,8 @@
|
||||
files:
|
||||
- controllerconfig/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: py27
|
||||
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
|
||||
|
||||
@ -135,6 +147,8 @@
|
||||
files:
|
||||
- controllerconfig/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: pylint
|
||||
tox_extra_args: -c controllerconfig/controllerconfig/tox.ini
|
||||
|
||||
@ -174,6 +188,8 @@
|
||||
- starlingx/fault
|
||||
- starlingx/integ
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: py27
|
||||
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini
|
||||
|
||||
@ -185,6 +201,8 @@
|
||||
files:
|
||||
- sysinv/cgts-client/*
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: pep8
|
||||
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini
|
||||
|
||||
@ -200,6 +218,8 @@
|
||||
- starlingx/fault
|
||||
- starlingx/integ
|
||||
vars:
|
||||
tox_environment:
|
||||
STX_PREFIX: ''
|
||||
tox_envlist: pylint
|
||||
tox_extra_args: -c sysinv/cgts-client/cgts-client/tox.ini
|
||||
|
||||
|
@ -11,13 +11,18 @@ stxdir = {toxinidir}/../../..
|
||||
|
||||
[testenv]
|
||||
whitelist_externals = find
|
||||
install_command = pip install --no-cache-dir -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
||||
install_command = pip install --no-cache-dir -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/pike/upper-constraints.txt} {opts} {packages}
|
||||
|
||||
# Note: Developers can leave STX_PREFIX unset in their env, and it will default to "stx-".
|
||||
# Zuul sets STX_PREFIX to an empty string.
|
||||
setenv = STX_PREFIX = {env:STX_PREFIX:stx-}
|
||||
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-e{[tox]stxdir}/fault/fm-api
|
||||
-e{[tox]stxdir}/update/tsconfig/tsconfig
|
||||
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv
|
||||
-e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}fault/fm-api
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}update/tsconfig/tsconfig
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}config/sysinv/sysinv/sysinv
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}config/sysinv/cgts-client/cgts-client
|
||||
|
||||
[testenv:venv]
|
||||
commands = {posargs}
|
||||
|
@ -17,6 +17,8 @@ skipsdist = True
|
||||
recreate = True
|
||||
|
||||
[testenv:puppetlint]
|
||||
# Note: centos developer env requires ruby-devel
|
||||
# Ubuntu developer env requires ruby-dev
|
||||
deps =
|
||||
whitelist_externals =
|
||||
gem
|
||||
|
@ -17,6 +17,8 @@ skipsdist = True
|
||||
recreate = True
|
||||
|
||||
[testenv:puppetlint]
|
||||
# Note: centos developer env requires ruby-devel
|
||||
# Ubuntu developer env requires ruby-dev
|
||||
deps =
|
||||
whitelist_externals =
|
||||
gem
|
||||
|
@ -5,22 +5,23 @@ minversion = 1.6
|
||||
|
||||
# tox does not work if the path to the workdir is too long, so move it to /tmp
|
||||
toxworkdir = /tmp/{env:USER}_cgtsclienttox
|
||||
cgcsdir = {toxinidir}/../../../..
|
||||
stxdir = {toxinidir}/../../../..
|
||||
distshare={toxworkdir}/.tox/distshare
|
||||
|
||||
wrdeps = -e{[tox]cgcsdir}/update/tsconfig/tsconfig
|
||||
|
||||
[testenv]
|
||||
# Note: Developers can leave STX_PREFIX unset in their env, and it will default to "stx-".
|
||||
# Zuul sets STX_PREFIX to an empty string.
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
OS_TEST_PATH=cgtsclient/tests
|
||||
TESTR_START_DIR=cgtsclient/tests
|
||||
STX_PREFIX = {env:STX_PREFIX:stx-}
|
||||
basepython = python2.7
|
||||
usedevelop = True
|
||||
install_command = pip install -U -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
{[tox]wrdeps}
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}update/tsconfig/tsconfig
|
||||
|
||||
commands =
|
||||
find {toxinidir} -not -path '{toxinidir}/.tox/*' -name '*.py[c|o]' -delete
|
||||
|
@ -20,9 +20,13 @@ sitepackages = True
|
||||
# tox is silly... these need to be separated by a newline....
|
||||
whitelist_externals = bash
|
||||
find
|
||||
install_command = pip install -v -v -v -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike} {opts} {packages}
|
||||
|
||||
install_command = pip install -v -v -v -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/pike/upper-constraints.txt} {opts} {packages}
|
||||
|
||||
# Note the hash seed is set to 0 until can be tested with a
|
||||
# random hash seed successfully.
|
||||
# Note: Developers can leave STX_PREFIX unset in their env, and it will default to "stx-".
|
||||
# Zuul sets STX_PREFIX to an empty string.
|
||||
setenv = VIRTUAL_ENV={envdir}
|
||||
PYTHONHASHSEED=0
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
@ -34,15 +38,16 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
SYSINV_TEST_ENV=True
|
||||
TOX_WORK_DIR={toxworkdir}
|
||||
PYLINTHOME={toxworkdir}
|
||||
STX_PREFIX = {env:STX_PREFIX:stx-}
|
||||
|
||||
deps = -r{toxinidir}/requirements.txt
|
||||
-r{toxinidir}/test-requirements.txt
|
||||
-e{[tox]stxdir}/update/tsconfig/tsconfig
|
||||
-e{[tox]stxdir}/fault/fm-api
|
||||
-e{[tox]stxdir}/fault/python-fmclient/fmclient
|
||||
-e{[tox]stxdir}/config/controllerconfig/controllerconfig
|
||||
-e{[tox]stxdir}/update/cgcs-patch/cgcs-patch
|
||||
-e{[tox]stxdir}/integ/utilities/platform-util/platform-util
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}update/tsconfig/tsconfig
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}fault/fm-api
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}fault/python-fmclient/fmclient
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}config/controllerconfig/controllerconfig
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}update/cgcs-patch/cgcs-patch
|
||||
-e{[tox]stxdir}/{env:STX_PREFIX}integ/utilities/platform-util/platform-util
|
||||
|
||||
commands =
|
||||
find . -type f -name "*.pyc" -delete
|
||||
|
Loading…
Reference in New Issue
Block a user