job_specs: add wireguard perf tests to regression
[csit.git] / resources / libraries / bash / entry / tox / README.txt
1 # Copyright (c) 2022 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 This directory contains tox scripts and other files they need.
15 Generally, a tox script is either a checker (suitable for automated verify)
16 or a fixer (manually started, risky as uncommitted edits can be lost).
17 Each tox script is assumed to be run from tox,
18 when working directory is set to ${CSIT_DIR}.
19
20 Each checker script should:
21 + Return nonzero exit code when it fails.
22 ++ The tox might ignore the code when the check is not blocking.
23 + Write less verbose output to stderr.
24 + Write (to stderr) PASSED or FAILED to help with debugging.
25 + Direct more verbose output to appropriately named .log file.
26 + Only the output suitable for automated processing by an external caller
27   should be written to stdout.
28 ++ The level of "less verbose" depends on check and state of codebase.
29 + TODO: Should we carefully document which files are
30   whitelisted/blacklisted for a particulat check?
31
32 Each fixer script should:
33 + Perform edits on current filesystem
34 + Not assume git is clean (there may be uncommitted edits).
35 + Use "git diff HEAD~" to get both comitted and uncomitted edits to analyze.
36 + Output whatever it wants (possibly nothing).
37
38 TODO: Should checkers be named differently than fixers?
39       E.g. both scripts and tox environments start with fix_?