root/tox.ini
Davlet Panech 0f3670fe64 debian: port helm chart script to debian
* build-helm-charts.sh:
  - auto-detect $OS
  - process DEB files on Debian

* deb-utils: new file with utilities for working with binary DEB files

* tox.ini: run unit tests for deb-utils

TESTS
========================================

Run script on CentOS and make sure the generated tarball's contents are
the same as before the patch.

Run script on Debian and make sure the generated tarball's contents look
reasonable.

Story: 2009897
Task: 45293

Depends-On: https://review.opendev.org/c/starlingx/openstack-armada-app/+/840561
Change-Id: Icbcb0bb7b47f623fac8d0851687423396edb5747
Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
2022-05-10 17:13:13 -04:00

71 lines
2.1 KiB
INI

[tox]
envlist = linters, unit-tests
minversion = 2.3
skipsdist = True
[testenv]
install_command = pip install -U {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
# Bashate warnings
# E001 Trailing Whitespace
# E002 Tab indents
# E003 Indent not multiple of 4
# E006 Line too long
# E010 The "do" should be on same line as for
# E011 Then keyword is not on same line as if or elif keyword
# E020 Function declaration not in format ^function name {$
# E042 local declaration hides errors
commands =
bash -c "find {toxinidir}/build-tools \
-not \( -type d -name .?\* -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
-name \*.sh \
-print0 | xargs --no-run-if-empty -0 bashate -v -e 'E*' -i E003,E006,E010"
bash -c "find {toxinidir}/build-tools \
-not \( -type d -name .?\* -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
\( -exec bash -c 'file \{\} | grep -q shell' \; \
-a ! -name '*.sh' \) \
-print0 | xargs --no-run-if-empty -0 bashate -v -e 'E*' -i E001,E002,E003,E006,E010,E011,E020,E042"
bash -c "find {toxinidir} \
\( -name stx -prune \) \
-o \( -name .tox -prune \) \
-o -type f -name '*.yaml' \
-print0 | xargs -0 yamllint"
[testenv:pep8]
basepython = python3
usedevelop = False
skip_install = True
deps =
pep8
commands =
pep8
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:unit-tests]
whitelist_externals = bash
basepython = python3
setenv = PYTHON3=python
commands =
bash -c " \
for f in {toxinidir}/build-tools/unit-tests/* ; do \
$f || exit 1 ; \
done ; \
"