integ/tox.ini
M. Vefa Bicakci 7e10236038 Update kexec-tools/makedumpfile to support v5.10 kernel
This patch updates kexec-tools from 2.0.15 to 2.0.21 (and its supporting
software package makedumpfile from 1.6.2 to 1.6.9) for compatibility
with the newer v5.10 kernel.

This commit clones the kexec-tools package's supporting files from
commit 26a7a543427eac59ed39728466f3d95d320f735a in the CentOS RPM
packaging git repository. Links for reference:

- 26a7a54342
- 26a7a54342

Please note that this patch causes the build system to pull in and
extract an SRPM file to acquire:
  kdump-anaconda-addon-003-29-g4c517c5.tar.gz

This is done for security, because the only public reference to commit
4c517c5 is on a Red Hat developer's personal Github account:
  https://github.com/ryncsn/kdump-anaconda-addon/commits/rhel-7

kexec-tools package's supporting files cloned by this commit trigger a
large number of shell script linting errors. Given that the shell
scripts in question are inherited from upstream (i.e., CentOS 7), the
"files" directory of this package is excluded from automated linting via
the changes in tox.ini.

Verification: A kexec-tools RPM package built with this commit was
installed onto an existing StarlingX system. A vmcore file was
succesfully collected from a kernel crash triggered with
/proc/sysrq-trigger. A recent version of the crash utility was found to
succesfully parse the collected vmcore file.

Credits: Thanks to Jiping Ma for helping with cleaning up and publishing
an earlier version of this patch.

Story: 2008921
Task: 43040

Depends-On: https://review.opendev.org/c/starlingx/tools/+/805127

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
Change-Id: Idc4e523610e4c09259300c8b67ea5e0fbe59c611
2021-10-19 14:29:42 -04:00

154 lines
4.6 KiB
INI

[tox]
envlist = linters,pylint
minversion = 2.3
skipsdist = True
stxdir = {toxinidir}/..
[testenv]
install_command = pip install --use-deprecated legacy-resolver -U \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
{opts} {packages}
setenv = VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
deps = -r{toxinidir}/test-requirements.txt
[testenv:linters]
basepython = python3
whitelist_externals = bash
# Ignore errors in included vendor code that we don't control.
#bashate ignore
#E006 Line too long
#E041 Arithmetic expansion using $[ is deprecated for $((
#E042 local declaration hides errors
#E043 Arithmetic compound has inconsistent return semantics
#E044 Use [[ for non-POSIX comparisions
commands =
bash -c "find {toxinidir} \
-path {toxinidir}/kubernetes/plugins/isolcpus-device-plugin/files/vendor -prune -o \
-path {toxinidir}/tools/kexec-tools/files -prune -o \
-not \( -type d -name .?\* -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
-name \*.sh \
-print0 | xargs -n 1 -0 bashate -v \
-i E006,E041,E042,E043,E044 -e E*"
bash -c "find {toxinidir} \
\( -path {toxinidir}/.tox \) -a -prune \
-o -type f -name '*.yaml' \
-print0 | xargs -0 yamllint"
[flake8]
# E series are pep8
# E265 block comment should start with '# '
# E266 too many leading '#' for block comment
# E402 module level import not at top of file
# E501 line too long > 80
# E722 do not use bare except'
# E741 ambiguous variable name
# F series
# F504 '...' % ... has unused named argument(s):
# F509 '...' % ... has unsupported format character ','
# F841 local variable 'e' is assigned to but never used
# H series are hacking
# H101: Use TODO(NAME)
# H102 is apache license
# H104: File contains nothing but comments
# H201: no 'except:' at least use 'except Exception:'
# H238: old style class declaration, use new style
# H306: imports not in alphabetical order
# W series
# W291 trailing whitespace
# W391 blank line at end of file
# W503 line break before binary operator
# W504 line break after binary operator
# B series are from bugbear
# B001 Do not use bare `except:
# B007 Loop control variable 'cpu' not used within the loop body.
# B009 Do not call getattr with a constant attribute value
# B010 Do not call setattr with a constant attribute value
# F series
# F401 'module' imported but unused
ignore = E265,E266,E402,E501,E722,E741
F504,F509,F841,
H101,H102,H104,H201,H238,H306,
W291,W391,W503,W504
B001,B007,B009,B010,
F401
[testenv:pep8]
basepython = python3
usedevelop = False
skip_install = True
deps =
hacking
flake8-bugbear<=19.3.0
flake8<3.8.3
commands =
flake8
[testenv:pylint]
basepython = python3
deps = -r{toxinidir}/test-requirements.txt
-e{[tox]stxdir}/config/tsconfig/tsconfig
-e{[tox]stxdir}/fault/fm-api/source
-e{[tox]stxdir}/config/sysinv/sysinv/sysinv
-e{[tox]stxdir}/config/sysinv/cgts-client/cgts-client
docutils
keyring===18.0.1
pkgconfig
libvirt-python
oslo_i18n
oslo_log
oslo_messaging
oslo_service
python-cephclient
python-cinderclient
python-glanceclient
python-keystoneclient
python-novaclient
SQLAlchemy
retrying
python-daemon==2.1.2
pylint
# There are currenrly 1 python module with a setup.py file
commands = pylint --rcfile=./pylint.rc \
tools/storage-topology/storage-topology/storage_topology
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf doc/build
sphinx-build -a -E -W -d doc/build/doctrees -b html doc/source doc/build/html
whitelist_externals = rm
[testenv:releasenotes]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
whitelist_externals =
rm
reno
[testenv:newnote]
basepython = python3
# Re-use the releasenotes venv
envdir = {toxworkdir}/releasenotes
deps = -r{toxinidir}/doc/requirements.txt
commands = reno new {posargs}
[testenv:functional]
basepython = python3
whitelist_externals = cat
commands = cat /etc/group