I have a project which uses tox for testing and testing is done in parallel. While using ci/cd it prints unnecessary logs. According to documentation, I have set TOX_PARALLEL_NO_SPINNER to 1 in order to disable spinner turns out it is not working for me. I am using tox = 3.12.0 and python version 3.6
CodePudding user response:
First, you need to define or show what are "unnecessary" logs?
For me it works as expected, e.g...
$ TOX_PARALLEL_NO_SPINNER=1 tox -p auto
GLOB sdist-make: /home/jugmac00/Projects/flask-reuploaded/setup.py
✔ OK py38 in 15.572 seconds
✔ OK py310 in 16.518 seconds
✔ OK py39 in 16.689 seconds
✔ OK py37 in 17.002 seconds
✔ OK py36 in 17.133 seconds
✔ OK coverage in 17.463 seconds
✔ OK mypy in 30.29 seconds
✔ OK docs in 15.169 seconds
✔ OK lint in 30.984 seconds
______________________________________________________ summary _______________________________________________________
py36: commands succeeded
py37: commands succeeded
py38: commands succeeded
py39: commands succeeded
py310: commands succeeded
lint: commands succeeded
mypy: commands succeeded
coverage: commands succeeded
docs: commands succeeded
congratulations :)
This is expected. The effect of TOX_PARALLEL_NO_SPINNER=1 is to turn off the spinner, so the output for CI does not get messed up.
In order to minimize the output of tox, you can append the q option.
$ TOX_PARALLEL_NO_SPINNER=1 tox -p auto -qq
✔ OK mypy in 7.336 seconds
✔ OK py39 in 7.517 seconds
✔ OK py36 in 7.535 seconds
✔ OK py38 in 7.534 seconds
✔ OK py310 in 7.539 seconds
✔ OK coverage in 7.955 seconds
✔ OK py37 in 8.085 seconds
✔ OK lint in 9.598 seconds
✔ OK docs in 5.576 seconds
Afaik this is the minimal possible output for tox.
If this is too much for your taste, you can redirect stdout.
P.S.: You are running both an old version of tox and an unsupported Python version.
