Add missing ansible-test --remote-terminate support. (#32918)

* Expand ansible-test --remote-terminate support:

- windows-integration
- network-integration

These commands previously accepted the option, but did not support it.

* Terminate windows and network instances when done.
This commit is contained in:
Matt Clay 2017-11-14 17:08:48 -08:00 committed by GitHub
parent e5b3f60a74
commit 6472723ba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 41 additions and 6 deletions

View file

@ -23,6 +23,7 @@ class WrappedThread(threading.Thread):
super(WrappedThread, self).__init__()
self._result = queue.Queue()
self.action = action
self.result = None
def run(self):
"""
@ -41,9 +42,13 @@ class WrappedThread(threading.Thread):
:rtype: any
"""
result, exception = self._result.get()
if exception:
if sys.version_info[0] > 2:
raise exception[1].with_traceback(exception[2])
# noinspection PyRedundantParentheses
exec('raise exception[0], exception[1], exception[2]') # pylint: disable=locally-disabled, exec-used
self.result = result
return result