Skip to content

-q should suppress the individual cmd times in the end summary #2891

Closed
@nedbat

Description

@nedbat

Issue

Normally when I run tox, it shows me the commands being run (commands[0] etc), and then at the end it shows the times the took (although it is cryptic: cmd[0.20,0.29,5.73,1.72,0.19,1.60]):

% tox -e py311 -- -n 0 -k foo
ROOT: tox-gh won't override envlist because tox is not running in GitHub Actions
.pkg-cpython311: _optional_hooks> python /usr/local/virtualenvs/coverage/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg-cpython311: get_requires_for_build_editable> python /usr/local/virtualenvs/coverage/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta
.pkg-cpython311: build_editable> python /usr/local/virtualenvs/coverage/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py311: install_package> python -m pip install -U --force-reinstall --no-deps .tox/.tmp/package/76/coverage-7.0.6a0.dev1-0.editable-cp311-cp311-macosx_10_15_x86_64.whl
py311: commands[0]> python igor.py zip_mods
py311: commands[1]> python setup.py --quiet build_ext --inplace
py311: commands[2]> python -m pip install -q -e .
py311: commands[3]> python igor.py test_with_tracer c -n 0 -k foo
=== CPython 3.11.1 with C tracer (.tox/py311/bin/python) ===
..........................................................                                                                                                            [100%]
58 passed, 1259 deselected in 1.17s
py311: commands[4]> python igor.py remove_extension
py311: commands[5]> python igor.py test_with_tracer py -n 0 -k foo
=== CPython 3.11.1 with Python tracer (.tox/py311/bin/python) ===
..........................................................                                                                                                            [100%]
58 passed, 1259 deselected in 1.14s
.pkg-cpython311: _exit> python /usr/local/virtualenvs/coverage/lib/python3.7/site-packages/pyproject_api/_backend.py True setuptools.build_meta
  py311: OK (11.72=setup[1.99]+cmd[0.20,0.29,5.73,1.72,0.19,1.60] seconds)
  congratulations :) (12.65 seconds)

If I run tox with -q, the commands are not shown, but their times are still included in the final lines:

% tox -q -e py311 -- -n 0 -k foo
=== CPython 3.11.1 with C tracer (.tox/py311/bin/python) ===
..........................................................                                                                                                            [100%]
58 passed, 1259 deselected in 1.15s
=== CPython 3.11.1 with Python tracer (.tox/py311/bin/python) ===
..........................................................                                                                                                            [100%]
58 passed, 1259 deselected in 1.19s
  py311: OK (11.62=setup[1.90]+cmd[0.19,0.29,5.67,1.73,0.20,1.65] seconds)
  congratulations :) (12.47 seconds)

There's no reason to split out the times for individual commands if the commands themselves are not shown. With -q the final line should be:

  py311: OK (11.62 seconds)

Metadata

Metadata

Assignees

No one assigned

    Labels

    help:wantedIssues that have been acknowledged, a solution determined and a PR might likely be accepted.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions