feat(tests): IPsecHW rxq ratio
[csit.git] / tox.ini
1 # Copyright (c) 2024 Cisco and/or its affiliates.
2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at:
5 #
6 #     http://www.apache.org/licenses/LICENSE-2.0
7 #
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
13
14 # Idea of this file is motivated by OpenDylight,
15 # especially its Integration/Test sub-project.
16
17 # This file requires active virtualenv with tox package installed,
18 # or python-tox system package installed.
19
20 # Usage:
21 # cd to CSIT root (other directories might use different tox.ini)
22 #   $ tox
23 # will execute all default checkers.
24 #  $ tox -e pylint
25 # will execute only checkers (or fixers) defined in "pylint" tox environment.
26
27 [tox]
28 # Fast and brief checkers to front, slow or verbose checkers to back.
29 envlist = copyright_year, gpl_license, new_line_length, line_length, autogen,
30   pylint
31
32 # The following is needed as tox requires setup.py by default.
33 skipsdist = true
34 # Just a shorthand to avoid long lines.
35 script_dir = ./resources/libraries/bash/entry/tox
36
37 # Recommended ordering withinn testenv definition:
38 # + General comments.
39 # + ignore_outcome for non-voting checkers,
40 # + setenv (PYTHONPATH) for Python-using checkers and fixers.
41 # + Other Python stuff (e.g. basepython and deps for pylint).
42 # + whitelist_externals to enable bash.
43 # + Commands with a single bash to launch the corresponding script.
44
45 [testenv:autogen]
46 setenv = PYTHONPATH = {toxinidir}
47 whitelist_externals = bash
48 commands = bash {[tox]script_dir}/autogen.sh
49
50 [testenv:copyright_year]
51 whitelist_externals = bash
52 commands = bash {[tox]script_dir}/copyright_year.sh
53
54 [testenv:fix_copyright_year]
55 whitelist_externals = bash
56 commands = bash {[tox]script_dir}/fix_copyright_year.sh
57
58 [testenv:gpl_license]
59 whitelist_externals = bash
60 commands = bash {[tox]script_dir}/gpl_license.sh
61
62 [testenv:line_length]
63 # Fix all transgressions and remove the ignore_outcome flag.
64 ignore_outcome = true
65 whitelist_externals = bash
66 commands = bash {[tox]script_dir}/line.sh
67
68 [testenv:new_line_length]
69 # Adding .svg, big .rst tables, .yaml and similar still requires long lines.
70 # As current implementation is too dumb to filter those out,
71 # the checker has to remain non-voting.
72 ignore_outcome = true
73 whitelist_externals = bash
74 commands = bash {[tox]script_dir}/new_line.sh
75
76 [testenv:pylint]
77 # Run pylint, but hide its return value until python warnings are cleared.
78 ignore_outcome = true
79 setenv = PYTHONPATH = {toxinidir}
80 basepython = python3
81 deps = -r ./requirements.txt
82 whitelist_externals = bash
83 commands = bash {[tox]script_dir}/pylint.sh