Cleanup tox.ini and zuul files from older releases
tox changes: - remove python2.7 and python3.6 unit test targets from tox.ini since only python 3.9 is supported - remove the (junk) functional target from tox.ini - fix yamllint target in tox.ini so it will actually process files. Also added a basic yammlint settings file. - nova-api-proxy tox jobs are now setup for py39 - Removed the py27 limitations from requirements files. - Removed the upper limits for pylint and astroid. - Added additional suppressions for new pylint codes. Zuul changes: - remove py27 job from zuul - remove the unused (never working) devstack job - set the parent zuul jobs to be the jobs defined under openstack-zuul-jobs rather than just zuul-jobs - Specify debian-bullseye (python3.9) as the nodeset. ubuntu-jammy iss python3.10, ubuntu-focal is python3.8 - override tox constraints file to use the STX constraints This means starlingx/root needs to be a required project - Removed the nodeset from the pep8 jobs. Note: these changes do not affect runtime for NFV. Test Plan: Pass tox in nfv directory of (debian) dev env. Pass tox in nova-api-proxy directory of (debian) dev env. build-pkgs -p nfv Story: 2010531 Task: 47146 Signed-off-by: Al Bailey <al.bailey@windriver.com> Change-Id: I6dad77bec40e9b64a9314b237270af046728efb3
This commit is contained in:
parent
bfded2ded6
commit
e6114addac
8
.yamllint
Normal file
8
.yamllint
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
extends: default
|
||||||
|
|
||||||
|
rules:
|
||||||
|
# 80 chars should be enough, but don't fail if a line is longer
|
||||||
|
line-length:
|
||||||
|
max: 80
|
||||||
|
level: warning
|
64
.zuul.yaml
64
.zuul.yaml
@ -8,7 +8,6 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- nfv-tox-pep8
|
- nfv-tox-pep8
|
||||||
- nfv-tox-py27
|
|
||||||
- nfv-tox-py39
|
- nfv-tox-py39
|
||||||
- nfv-tox-pylint
|
- nfv-tox-pylint
|
||||||
- nova-api-proxy-tox-pep8
|
- nova-api-proxy-tox-pep8
|
||||||
@ -17,7 +16,6 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- nfv-tox-pep8
|
- nfv-tox-pep8
|
||||||
- nfv-tox-py27
|
|
||||||
- nfv-tox-py39
|
- nfv-tox-py39
|
||||||
- nfv-tox-pylint
|
- nfv-tox-pylint
|
||||||
- nova-api-proxy-tox-pep8
|
- nova-api-proxy-tox-pep8
|
||||||
@ -26,51 +24,37 @@
|
|||||||
jobs:
|
jobs:
|
||||||
- stx-nfv-upload-git-mirror
|
- stx-nfv-upload-git-mirror
|
||||||
|
|
||||||
- job:
|
|
||||||
name: nfv-tox-py27
|
|
||||||
parent: tox
|
|
||||||
description: Run py27 for nfv
|
|
||||||
nodeset: ubuntu-xenial
|
|
||||||
required-projects:
|
|
||||||
- starlingx/fault
|
|
||||||
vars:
|
|
||||||
tox_envlist: py27
|
|
||||||
tox_extra_args: -c nfv/tox.ini
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nfv-tox-py39
|
name: nfv-tox-py39
|
||||||
parent: tox-py39
|
parent: openstack-tox-py39
|
||||||
description: Run py39 for nfv
|
description: Run py39 for nfv
|
||||||
nodeset: debian-bullseye
|
nodeset: debian-bullseye
|
||||||
required-projects:
|
required-projects:
|
||||||
- starlingx/fault
|
- starlingx/fault
|
||||||
- starlingx/root
|
- starlingx/root
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: py39
|
|
||||||
tox_extra_args: -c nfv/tox.ini
|
tox_extra_args: -c nfv/tox.ini
|
||||||
bindep_profile: test py39
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
python_version: 3.9
|
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nfv-tox-pep8
|
name: nfv-tox-pep8
|
||||||
parent: tox
|
parent: openstack-tox-pep8
|
||||||
description: Run pep8 for nfv
|
description: Run pep8 for nfv
|
||||||
required-projects:
|
|
||||||
- starlingx/fault
|
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: pep8
|
|
||||||
tox_extra_args: -c nfv/tox.ini
|
tox_extra_args: -c nfv/tox.ini
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nfv-tox-pylint
|
name: nfv-tox-pylint
|
||||||
parent: tox
|
parent: tox
|
||||||
description: Run pylint for nfv
|
description: Run pylint for nfv
|
||||||
nodeset: ubuntu-xenial
|
nodeset: debian-bullseye
|
||||||
required-projects:
|
required-projects:
|
||||||
- starlingx/fault
|
- starlingx/fault
|
||||||
|
- starlingx/root
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: pylint
|
tox_envlist: pylint
|
||||||
tox_extra_args: -c nfv/tox.ini
|
tox_extra_args: -c nfv/tox.ini
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nova-api-proxy-tox-pep8
|
name: nova-api-proxy-tox-pep8
|
||||||
@ -84,42 +68,14 @@
|
|||||||
name: nova-api-proxy-tox-pylint
|
name: nova-api-proxy-tox-pylint
|
||||||
parent: tox
|
parent: tox
|
||||||
description: Run pylint for nova-api-proxy
|
description: Run pylint for nova-api-proxy
|
||||||
nodeset: ubuntu-xenial
|
nodeset: debian-bullseye
|
||||||
|
required-projects:
|
||||||
|
- starlingx/root
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: pylint
|
tox_envlist: pylint
|
||||||
tox_extra_args: -c nova-api-proxy/tox.ini
|
tox_extra_args: -c nova-api-proxy/tox.ini
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
- job:
|
|
||||||
name: flock-devstack-nfv
|
|
||||||
parent: flock-devstack-base-min
|
|
||||||
required-projects:
|
|
||||||
- openstack/barbican
|
|
||||||
- openstack/python-barbicanclient
|
|
||||||
- starlingx/config
|
|
||||||
- starlingx/fault
|
|
||||||
- starlingx/integ
|
|
||||||
- starlingx/metal
|
|
||||||
- starlingx/update
|
|
||||||
vars:
|
|
||||||
tox_envlist: functional
|
|
||||||
devstack_services:
|
|
||||||
# StarlingX services
|
|
||||||
cgtsclient: true
|
|
||||||
fm-common: true
|
|
||||||
fm-api: true
|
|
||||||
fm-rest-api: true
|
|
||||||
fm-mgr: true
|
|
||||||
nfv-common: true
|
|
||||||
nfv-vim: true
|
|
||||||
nfv-client: true
|
|
||||||
devstack_plugins:
|
|
||||||
barbican: https://opendev.org/openstack/barbican
|
|
||||||
config: https://opendev.org/starlingx/config
|
|
||||||
fault: https://opendev.org/starlingx/fault
|
|
||||||
integ: https://opendev.org/starlingx/integ
|
|
||||||
metal: https://opendev.org/starlingx/metal
|
|
||||||
nfv: https://opendev.org/starlingx/nfv
|
|
||||||
update: https://opendev.org/starlingx/update
|
|
||||||
- job:
|
- job:
|
||||||
name: stx-nfv-upload-git-mirror
|
name: stx-nfv-upload-git-mirror
|
||||||
parent: upload-git-mirror
|
parent: upload-git-mirror
|
||||||
|
@ -117,21 +117,33 @@ enable=E1603,E1609,E1610,E1602,E1606,E1608,E1607,E1605,E1604,E1601,E1611,W1652,
|
|||||||
# W0401 wildcard-import
|
# W0401 wildcard-import
|
||||||
# W0404 reimported
|
# W0404 reimported
|
||||||
# W0511 fixme
|
# W0511 fixme
|
||||||
|
# W0602 global-variable-not-assigned
|
||||||
# W0603 Using the global statement warning
|
# W0603 Using the global statement warning
|
||||||
# W0612 Unused variable warning
|
# W0612 Unused variable warning
|
||||||
# W0613 Unused argument warning
|
# W0613 Unused argument warning
|
||||||
# W0621 redefined-outer-name
|
# W0621 redefined-outer-name
|
||||||
# W0622 redefined-builtin
|
# W0622 redefined-builtin
|
||||||
# W0703 broad except warning
|
# W0703 broad except warning
|
||||||
# W0706: The except handler raises immediately (try-except-raise)
|
# W0706 The except handler raises immediately (try-except-raise)
|
||||||
|
# W0707 raise-missing-from
|
||||||
|
# W1310 format-string-without-interpolation
|
||||||
# W1401 anomalous-backslash-in-string
|
# W1401 anomalous-backslash-in-string
|
||||||
# W1505: Using deprecated method getargspec() (deprecated-method)
|
# W1406 redundant-u-string-prefix
|
||||||
# E0012: pylint for python3 does not support inline deprecation
|
# W1505 Using deprecated method getargspec() (deprecated-method)
|
||||||
# Disable Python3 checkers:
|
# W1514 unspecified-encoding
|
||||||
# W1618: no-absolute-import
|
# W1618 no-absolute-import (Python3 checker)
|
||||||
disable=C, R, E0012, W0120, W0125, W0212, W0221, W0223, W0231, W0235,
|
# W0237 arguments-renamed
|
||||||
W0401, W0404, W0511, W0603, W0612, W0613, W0621, W0622, W0703, W1401,
|
# W4904 deprecated-class
|
||||||
W0107, W0706, W1505, W1618
|
# W4905 deprecated-decorator
|
||||||
|
# E0012 pylint for python3 does not support inline deprecation
|
||||||
|
# E1101 no-member
|
||||||
|
# E1111 assignment-from-no-return
|
||||||
|
# E1120 no-value-for-parameter
|
||||||
|
# E1121 too-many-function-args
|
||||||
|
disable=C, R, W0120, W0125, W0212, W0221, W0223, W0231, W0235,
|
||||||
|
W0401, W0404, W0511, W0602, W0603, W0612, W0613, W0621, W0622, W0703, W1401,
|
||||||
|
W0107, W0706, W0707, W1310, W1406, W1505, W1514, W1618, W0237, W4904, W4905,
|
||||||
|
E0012, E1101, E1111, E1120, E1121
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
# Set the output format. Available formats are text, parseable, colorized, msvs
|
# Set the output format. Available formats are text, parseable, colorized, msvs
|
||||||
|
@ -2,12 +2,9 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
hacking>=1.1.0,<=2.0.0 # Apache-2.0
|
hacking>=1.1.0,<=2.0.0 # Apache-2.0
|
||||||
astroid<2.0;python_version<"3.0" # GPLv2
|
bandit<1.6.0
|
||||||
astroid<= 2.2.5;python_version>="3.0" # GPLv2
|
|
||||||
bandit<1.6.0;python_version>="3.0"
|
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
pylint<2.1.0;python_version<"3.0" # GPLv2
|
pylint
|
||||||
pylint<2.4.0;python_version>="3.0" # GPLv2
|
|
||||||
testtools>=2.2.0 # MIT
|
testtools>=2.2.0 # MIT
|
||||||
|
44
nfv/tox.ini
44
nfv/tox.ini
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2018 Wind River Systems, Inc.
|
# Copyright (c) 2018-2023 Wind River Systems, Inc.
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
#
|
#
|
||||||
@ -10,18 +10,18 @@
|
|||||||
# and then run "tox" from this directory.
|
# and then run "tox" from this directory.
|
||||||
[tox]
|
[tox]
|
||||||
toxworkdir = /tmp/{env:USER}_nfvtox
|
toxworkdir = /tmp/{env:USER}_nfvtox
|
||||||
envlist = pep8,py27,py36,py39,pylint
|
envlist = pep8,py39,pylint
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
stxdir = {toxinidir}/../..
|
stxdir = {toxinidir}/../..
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
deps = -r{toxinidir}/requirements.txt
|
||||||
|
-r{toxinidir}/test-requirements.txt
|
||||||
install_command = pip install \
|
install_command = pip install \
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
{opts} {packages}
|
{opts} {packages}
|
||||||
allowlist_externals = cp
|
allowlist_externals = cp
|
||||||
|
|
||||||
deps = -r{toxinidir}/requirements.txt
|
|
||||||
-r{toxinidir}/test-requirements.txt
|
|
||||||
|
|
||||||
[nfv]
|
[nfv]
|
||||||
nfv_base_dir = .
|
nfv_base_dir = .
|
||||||
@ -91,7 +91,6 @@ enable-extensions = H106,H203
|
|||||||
max-line-length = 185
|
max-line-length = 185
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
usedevelop = False
|
usedevelop = False
|
||||||
skip_install = True
|
skip_install = True
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
@ -100,7 +99,6 @@ commands =
|
|||||||
|
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python3
|
|
||||||
deps = {[nfv]deps}
|
deps = {[nfv]deps}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
{[nfv]nfv_test_dir}/nfv_scenario_tests
|
{[nfv]nfv_test_dir}/nfv_scenario_tests
|
||||||
@ -126,40 +124,9 @@ exclude = ./nfv-docs,./nfv-tests,./nfv-debug-tools,unit_test
|
|||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
deps = {[nfv]deps}
|
deps = {[nfv]deps}
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
basepython = python3
|
|
||||||
commands = bandit --ini tox.ini -f txt -r {[nfv]nfv_base_dir}
|
commands = bandit --ini tox.ini -f txt -r {[nfv]nfv_base_dir}
|
||||||
|
|
||||||
[testenv:py27]
|
|
||||||
basepython = python2.7
|
|
||||||
deps = {[nfv]deps}
|
|
||||||
coverage
|
|
||||||
fixtures
|
|
||||||
mock
|
|
||||||
stestr
|
|
||||||
testtools
|
|
||||||
setenv = PYTHONDONTWRITEBYTECODE=True
|
|
||||||
commands = cp -v {[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_19.12 {envdir}/
|
|
||||||
stestr --test-path={[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/tests run '{posargs}'
|
|
||||||
stestr slowest
|
|
||||||
|
|
||||||
[testenv:py36]
|
|
||||||
basepython = python3.6
|
|
||||||
deps = {[nfv]deps}
|
|
||||||
coverage
|
|
||||||
fixtures
|
|
||||||
mock
|
|
||||||
stestr
|
|
||||||
testtools
|
|
||||||
setenv = PYTHONDONTWRITEBYTECODE=True
|
|
||||||
commands = cp -v {[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/test_data/nfv_vim_db_stx_19.12 {envdir}/
|
|
||||||
stestr --test-path={[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/tests run '{posargs}'
|
|
||||||
stestr slowest
|
|
||||||
|
|
||||||
[testenv:py39]
|
[testenv:py39]
|
||||||
basepython = python3.9
|
|
||||||
install_command = pip install \
|
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
|
||||||
{opts} {packages}
|
|
||||||
deps = {[nfv]deps}
|
deps = {[nfv]deps}
|
||||||
coverage
|
coverage
|
||||||
fixtures
|
fixtures
|
||||||
@ -173,7 +140,6 @@ commands = cp -v {[nfv]nfv_base_dir}/nfv-tests/nfv_unit_tests/test_data/nfv_vim_
|
|||||||
|
|
||||||
|
|
||||||
[testenv:cover]
|
[testenv:cover]
|
||||||
basepython = python3
|
|
||||||
deps = {[nfv]deps}
|
deps = {[nfv]deps}
|
||||||
coverage
|
coverage
|
||||||
fixtures
|
fixtures
|
||||||
|
@ -106,17 +106,23 @@ enable=E1603,E1609,E1610,E1602,E1606,E1608,E1607,E1605,E1604,E1601,E1611,W1652,
|
|||||||
# can either give multiple identifier separated by comma (,) or put this option
|
# can either give multiple identifier separated by comma (,) or put this option
|
||||||
# multiple time (only on the command line, not in the configuration file where
|
# multiple time (only on the command line, not in the configuration file where
|
||||||
# it should appear only once).
|
# it should appear only once).
|
||||||
# E1101 no-member
|
|
||||||
# E1121: Too many positional arguments for function call
|
|
||||||
# W0404 reimported
|
# W0404 reimported
|
||||||
# W0601 Global variable %r undefined at the module level
|
# W0601 Global variable %r undefined at the module level
|
||||||
|
# W0602 global-variable-not-assigned
|
||||||
# W0603 Using the global statement warning
|
# W0603 Using the global statement warning
|
||||||
# W0613 Unused argument warning
|
# W0613 Unused argument warning
|
||||||
# W0621 Redefining name %r from outer scope
|
# W0621 Redefining name %r from outer scope
|
||||||
# W0703 broad except warning
|
# W0703 broad except warning
|
||||||
# Disable Python3 checkers:
|
# W0707 raise-missing-from
|
||||||
# W1618: no-absolute-import
|
# W1310 format-string-without-interpolation
|
||||||
disable=C, R, E1101, E1121, W0404, W0601, W0603, W0613, W0621, W0703, W1618
|
# W1514 unspecified-encoding
|
||||||
|
# W1618: no-absolute-import (py3 enable from above)
|
||||||
|
# E1101 no-member
|
||||||
|
# E1121: Too many positional arguments for function call
|
||||||
|
# E1128 assignment-from-none
|
||||||
|
disable=C, R,
|
||||||
|
W0404, W0601, W0602, W0603, W0613, W0621, W0703, W0707, W1310, W1514, W1618,
|
||||||
|
E1101, E1121, E1128,
|
||||||
|
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
|
@ -2,11 +2,8 @@
|
|||||||
# of appearance. Changing the order has an impact on the overall integration
|
# of appearance. Changing the order has an impact on the overall integration
|
||||||
# process, which may cause wedges in the gate later.
|
# process, which may cause wedges in the gate later.
|
||||||
hacking>=1.1.0,<=2.0.0 # Apache-2.0
|
hacking>=1.1.0,<=2.0.0 # Apache-2.0
|
||||||
astroid<2.0;python_version<"3.0" # GPLv2
|
|
||||||
astroid<= 2.2.5;python_version>="3.0" # GPLv2
|
|
||||||
bandit<1.6.0;python_version>="3.0"
|
bandit<1.6.0;python_version>="3.0"
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
mock>=2.0.0 # BSD
|
mock>=2.0.0 # BSD
|
||||||
pylint<2.1.0;python_version<"3.0" # GPLv2
|
pylint
|
||||||
pylint<2.4.0;python_version>="3.0" # GPLv2
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = pep8,pylint
|
envlist = pep8,pylint
|
||||||
minversion = 2.3
|
minversion = 2.9
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
sitepackages = False
|
sitepackages = False
|
||||||
install_command = pip install \
|
install_command = pip install \
|
||||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
{opts} {packages}
|
{opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
OS_STDOUT_CAPTURE=1
|
OS_STDOUT_CAPTURE=1
|
||||||
@ -43,7 +43,6 @@ commands =
|
|||||||
flake8
|
flake8
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python2.7
|
|
||||||
deps=
|
deps=
|
||||||
-r{toxinidir}/test-requirements.txt
|
-r{toxinidir}/test-requirements.txt
|
||||||
eventlet
|
eventlet
|
||||||
|
44
tox.ini
44
tox.ini
@ -1,47 +1,49 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = linters
|
envlist = linters
|
||||||
minversion = 2.3
|
minversion = 2.9
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
allowlist_externals = find
|
||||||
|
basepython = python3
|
||||||
|
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
|
||||||
|
deps = -r{toxinidir}/test-requirements.txt
|
||||||
|
install_command = pip install -U \
|
||||||
|
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
|
{opts} {packages}
|
||||||
setenv = VIRTUAL_ENV={envdir}
|
setenv = VIRTUAL_ENV={envdir}
|
||||||
OS_STDOUT_CAPTURE=1
|
OS_STDOUT_CAPTURE=1
|
||||||
OS_STDERR_CAPTURE=1
|
OS_STDERR_CAPTURE=1
|
||||||
OS_TEST_TIMEOUT=60
|
OS_TEST_TIMEOUT=60
|
||||||
PYTHONDONTWRITEBYTECODE=True
|
PYTHONDONTWRITEBYTECODE=True
|
||||||
install_command = pip install -U {opts} {packages}
|
|
||||||
commands = find {toxinidir} -type f -not -path '{toxinidir}/.tox/*' -not -path '*/__pycache__/*' -name '*.py[c|o]' -delete
|
|
||||||
deps = -r{toxinidir}/test-requirements.txt
|
|
||||||
allowlist_externals = find
|
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
|
||||||
commands = {posargs}
|
commands = {posargs}
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
basepython = python3
|
|
||||||
description = Dummy environment to allow flake8 to be run in subdir tox
|
description = Dummy environment to allow flake8 to be run in subdir tox
|
||||||
|
|
||||||
[testenv:pep8]
|
[testenv:pep8]
|
||||||
basepython = python3
|
|
||||||
description = Dummy environment to allow pep8 to be run in subdir tox
|
description = Dummy environment to allow pep8 to be run in subdir tox
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
basepython = python2.7
|
|
||||||
description = Dummy environment to allow pylint to be run in subdir tox
|
description = Dummy environment to allow pylint to be run in subdir tox
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:yamllint]
|
||||||
basepython = python3
|
|
||||||
allowlist_externals = bash
|
allowlist_externals = bash
|
||||||
commands =
|
commands =
|
||||||
bash -c "find {toxinidir} \
|
bash -c "find {toxinidir} \
|
||||||
\( -name middleware/io-monitor/recipes-common/io-monitor/io-monitor/io_monitor/test-tools/yaml/* -prune \) \
|
-name .tox -prune \
|
||||||
-o \( -name .tox -prune \) \
|
-o -type f -name '*.yaml' \
|
||||||
-o -type f -name '*.yaml' \
|
-print0 | xargs -0 yamllint -f parsable \
|
||||||
-print0 | xargs -0 yamllint"
|
-c {toxinidir}/.yamllint"
|
||||||
|
|
||||||
|
[testenv:linters]
|
||||||
|
allowlist_externals = bash
|
||||||
|
commands =
|
||||||
|
{[testenv:yamllint]commands}
|
||||||
|
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf doc/build
|
rm -rf doc/build
|
||||||
@ -49,7 +51,6 @@ commands =
|
|||||||
allowlist_externals = rm
|
allowlist_externals = rm
|
||||||
|
|
||||||
[testenv:releasenotes]
|
[testenv:releasenotes]
|
||||||
basepython = python3
|
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf releasenotes/build
|
rm -rf releasenotes/build
|
||||||
@ -59,22 +60,15 @@ allowlist_externals =
|
|||||||
reno
|
reno
|
||||||
|
|
||||||
[testenv:newnote]
|
[testenv:newnote]
|
||||||
basepython = python3
|
|
||||||
# Re-use the releasenotes venv
|
# Re-use the releasenotes venv
|
||||||
envdir = {toxworkdir}/releasenotes
|
envdir = {toxworkdir}/releasenotes
|
||||||
deps = -r{toxinidir}/doc/requirements.txt
|
deps = -r{toxinidir}/doc/requirements.txt
|
||||||
commands = reno new {posargs}
|
commands = reno new {posargs}
|
||||||
|
|
||||||
[testenv:api-ref]
|
[testenv:api-ref]
|
||||||
basepython = python3
|
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/doc/requirements.txt
|
-r{toxinidir}/doc/requirements.txt
|
||||||
commands =
|
commands =
|
||||||
rm -rf api-ref/build
|
rm -rf api-ref/build
|
||||||
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
sphinx-build -W -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html
|
||||||
allowlist_externals = rm
|
allowlist_externals = rm
|
||||||
|
|
||||||
[testenv:functional]
|
|
||||||
basepython = python3
|
|
||||||
allowlist_externals = cat
|
|
||||||
commands = cat /etc/fm/fm.conf
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user