Commit 8d767860 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)
parent 96ba9439
......@@ -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
......@@ -1107,6 +1110,9 @@ 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
],
close_fds=True,
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