Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
nedbat opened this issue Jan 24, 2023 · 1 comment
Closed

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

nedbat opened this issue Jan 24, 2023 · 1 comment
Labels
help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.

Comments

@nedbat
Copy link
Contributor

nedbat commented Jan 24, 2023

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)
nedbat added a commit to nedbat/tox that referenced this issue Apr 24, 2023
nedbat added a commit to nedbat/tox that referenced this issue Apr 24, 2023
@gaborbernat gaborbernat added the help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted. label Jun 16, 2023
@gaborbernat
Copy link
Member

This was done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help:wanted Issues that have been acknowledged, a solution determined and a PR might likely be accepted.
Projects
None yet
Development

No branches or pull requests

2 participants