mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-23 17:39:09 -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
|
@ -11,6 +11,10 @@ from lib.util import (
|
|||
ABC,
|
||||
)
|
||||
|
||||
from lib.constants import (
|
||||
TIMEOUT_PATH,
|
||||
)
|
||||
|
||||
# improve performance by disabling uid/gid lookups
|
||||
tarfile.pwd = None
|
||||
tarfile.grp = None
|
||||
|
@ -45,6 +49,7 @@ class DefaultTarFilter(TarFilter):
|
|||
self.ignore_files = (
|
||||
'.gitignore',
|
||||
'.gitdir',
|
||||
TIMEOUT_PATH,
|
||||
)
|
||||
|
||||
self.ignore_extensions = (
|
||||
|
@ -58,7 +63,7 @@ class DefaultTarFilter(TarFilter):
|
|||
:rtype: tarfile.TarInfo | None
|
||||
"""
|
||||
filename = os.path.basename(item.path)
|
||||
name, ext = os.path.splitext(filename)
|
||||
ext = os.path.splitext(filename)[1]
|
||||
dirs = os.path.split(item.path)
|
||||
|
||||
if not item.isdir():
|
||||
|
@ -68,7 +73,7 @@ class DefaultTarFilter(TarFilter):
|
|||
if item.path.startswith('./docs/docsite/_build/'):
|
||||
return None
|
||||
|
||||
if name in self.ignore_files:
|
||||
if filename in self.ignore_files:
|
||||
return None
|
||||
|
||||
if ext in self.ignore_extensions:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue