tests: ensure strace is available in the docker image..

..and enable privileged=True since that's needed for ptrace()
This commit is contained in:
David Wilson 2017-12-05 02:01:19 +05:30
parent 247f50e08d
commit ec1de4b4b9
2 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,8 @@ RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22 EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"] CMD ["/usr/sbin/sshd", "-D"]
RUN apt-get install -y strace && apt-get clean && { echo '#!/bin/bash\nexec strace -ff -o /tmp/pywrap$$.trace python2.7 "$@"' > /usr/local/bin/pywrap; chmod +x /usr/local/bin/pywrap; }
""" """

View File

@ -134,6 +134,7 @@ class DockerizedSshDaemon(object):
self.container = self.docker.containers.run( self.container = self.docker.containers.run(
image='d2mw/mitogen-test', image='d2mw/mitogen-test',
detach=True, detach=True,
privileged=True,
publish_all_ports=True, publish_all_ports=True,
) )
self.container.reload() self.container.reload()