Files
update/software/tox.ini
Bin Qian ceb479944a update tox ignore list to skip H904
The check for H904 is default off and it should be remain off to
be consistant with other starlingx components.

Closes-Bug: 2039717

Change-Id: I69c88440d4dd5e4839c2bebb01ea5219a1a13ba0
Signed-off-by: Bin Qian <bin.qian@windriver.com>
2023-10-18 17:14:49 +00:00

86 lines
1.9 KiB
INI

#
# Copyright (c) 2023 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
[tox]
envlist = pep8,py39,pylint
minversion = 2.3.2
skipsdist = True
stxdir = {toxinidir}/../..
[testenv]
allowlist_externals = find
sh
basepython = python3
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
-e{[tox]stxdir}/config/tsconfig/tsconfig
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}
passenv =
XDG_CACHE_HOME
setenv = VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_ALL=C
OS_STDERR_CAPTURE=1
OS_STDOUT_CAPTURE=1
OS_TEST_TIMEOUT=60
PYTHONDONTWRITEBYTECODE=True
PYTHONHASHSEED=0
sitepackages = False
usedevelop = true
[bandit]
exclude = tests
skips =
[testenv:bandit]
commands = bandit --ini tox.ini -n 5 -r software
[testenv:cover]
setenv =
{[testenv]setenv}
PYTHON=coverage run --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage html -d cover
coverage xml -o cover/coverage.xml
coverage report
[flake8]
# H106: Don't put vim configuration in source files (off by default).
# H203: Use assertIs(Not)None to check for None (off by default).
enable-extensions = H106,H203
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build,release-tag-*
max-line-length = 80
show-source = True
ignore = E402,H306,H404,H405,W504,E501
[testenv:flake8]
commands = flake8 {posargs}
[testenv:pep8]
commands = flake8 {posargs}
[testenv:py39]
basepython = python3.9
commands =
stestr run {posargs}
stestr slowest
[testenv:pylint]
commands = pylint software --rcfile=./pylint.rc
[stestr]
test_path=./software/tests
top_dir=./
group_regex=([^\.]*\.)*