Commit 93d5430c authored by Jérome Perrin's avatar Jérome Perrin

tests/slapproxy: discard child slapos proxy output

to keep tests silent.
On python2, this uses subprocess32, which backports DEVNULL (and
default setting of closing file descriptors). Note that subprocess32 was
already installed because it's an indirect dependency
(cliff->cmd2->subprocess32),  make it a direct dependency now that we
are using it directly.
parent 10d14bda
......@@ -54,6 +54,7 @@ setup(name=name,
'zope.interface', # slap library implementes interfaces
'zc.buildout',
'cliff',
'subprocess32; python_version<"3"',
'requests>=2.4.3',
'six',
'uritemplate', # used by hateoas navigator
......
......@@ -34,7 +34,10 @@ import os
import logging
import shutil
import socket
import subprocess
try:
import subprocess32 as subprocess
except ImportError:
import subprocess
import sys
import tempfile
import time
......@@ -1029,6 +1032,8 @@ database_uri = %(tempdir)s/lib/external_proxy.db
sys.executable, '%s/../cli/entry.py' % os.path.dirname(slapos.tests.__file__),
'proxy', 'start', '--cfg', self.external_slapproxy_configuration_file_location
],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
env={"PYTHONPATH": ':'.join(sys.path)}
)
# Wait a bit for proxy to be started
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment