mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-25 02:19:10 -07:00
Add timeout support to ansible-test. (#53302)
* Add timeout support to ansible-test. * Fix ansible-test tar filename filter bug. * Update timeouts used on Shippable. * Kill subprocesses when parent process terminates. * Require explicit use of env --show option.
This commit is contained in:
parent
44b347aef5
commit
a8d829d9c3
9 changed files with 218 additions and 20 deletions
|
@ -52,6 +52,7 @@ from lib.config import (
|
|||
from lib.env import (
|
||||
EnvConfig,
|
||||
command_env,
|
||||
configure_timeout,
|
||||
)
|
||||
|
||||
from lib.sanity import (
|
||||
|
@ -95,6 +96,7 @@ def main():
|
|||
display.color = config.color
|
||||
display.info_stderr = (isinstance(config, SanityConfig) and config.lint) or (isinstance(config, IntegrationConfig) and config.list_targets)
|
||||
check_startup()
|
||||
configure_timeout(config)
|
||||
|
||||
display.info('RLIMIT_NOFILE: %s' % (CURRENT_RLIMIT_NOFILE,), verbosity=2)
|
||||
display.info('MAXFD: %d' % MAXFD, verbosity=2)
|
||||
|
@ -509,6 +511,11 @@ def parse_args():
|
|||
action='store_true',
|
||||
help='dump environment to disk')
|
||||
|
||||
env.add_argument('--timeout',
|
||||
type=int,
|
||||
metavar='MINUTES',
|
||||
help='timeout for future ansible-test commands (0 clears)')
|
||||
|
||||
if argcomplete:
|
||||
argcomplete.autocomplete(parser, always_complete_options=False, validator=lambda i, k: True)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue