From 3fd8cd6ba99479b764b803e1632a09f18a32ddeb Mon Sep 17 00:00:00 2001 From: Christophe Haen Date: Mon, 25 Mar 2024 07:01:10 +0100 Subject: [PATCH] test: redirect test_integrations.py popen stdout/stderr to a file --- integration_tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/integration_tests.py b/integration_tests.py index 07dd6e58c5c..da6d33e0eef 100755 --- a/integration_tests.py +++ b/integration_tests.py @@ -334,12 +334,15 @@ def prepare_environment( # We use Popen because we don't want to wait for this command to finish. # It is going to start all the diracx containers, including one which waits # for the DIRAC installation to be over. + subStdout = open(docker_compose_fn_final / "stdout", "w") + subStderr = open(docker_compose_fn_final / "stderr", "w") + subprocess.Popen( ["docker", "compose", "-f", docker_compose_fn_final / "docker-compose.yml", "up", "-d", "diracx"], env=docker_compose_env, stdin=None, - stdout=None, - stderr=None, + stdout=subStdout, + stderr=subStderr, close_fds=True, )