diff options
author | Bernát Gábor <gaborjbernat@gmail.com> | 2022-12-05 20:37:15 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-05 20:37:15 -0800 |
commit | c5013f356e07183b0c2b7abeffd23a05fd404314 (patch) | |
tree | 45ece3cc183cc484fc74716ebf3a4d9fc67f8524 /src/tox/config | |
parent | 4c77457137993c43da7a74aab49943283183f3e1 (diff) | |
download | tox-git-c5013f356e07183b0c2b7abeffd23a05fd404314.tar.gz |
Better handling of build backend without editable support and add --exit-and-dump-after flag (#2597)
Resolves https://github.com/tox-dev/tox/issues/2567
Resolves https://github.com/tox-dev/tox/issues/2595
Diffstat (limited to 'src/tox/config')
-rw-r--r-- | src/tox/config/cli/parser.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/tox/config/cli/parser.py b/src/tox/config/cli/parser.py index c2a842d6..ffd52d37 100644 --- a/src/tox/config/cli/parser.py +++ b/src/tox/config/cli/parser.py @@ -132,6 +132,8 @@ class Parsed(Namespace): """:return: flag indicating if the output is colored or not""" return cast(bool, self.colored == "yes") + exit_and_dump_after: int + ArgumentArgs = Tuple[Tuple[str, ...], Optional[Type[Any]], Dict[str, Any]] @@ -305,9 +307,21 @@ def add_color_flags(parser: ArgumentParser) -> None: ) +def add_exit_and_dump_after(parser: ArgumentParser) -> None: + parser.add_argument( + "--exit-and-dump-after", + dest="exit_and_dump_after", + metavar="seconds", + default=0, + type=int, + help="dump tox threads after n seconds and exit the app - useful to debug when tox hangs, 0 means disabled", + ) + + def add_core_arguments(parser: ArgumentParser) -> None: add_color_flags(parser) add_verbosity_flags(parser) + add_exit_and_dump_after(parser) parser.add_argument( "-c", "--conf", |