From 83baece6ece3e184e3b15d240e46321577567ebb Mon Sep 17 00:00:00 2001 From: "Magomed Kostoev (mkostoevr)" Date: Fri, 26 Nov 2021 21:57:31 +0000 Subject: [PATCH] [KERNEL][TEST] Log stdout and stderr of qemu into files git-svn-id: svn://kolibrios.org@9324 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/test/common/__init__.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/kernel/trunk/test/common/__init__.py b/kernel/trunk/test/common/__init__.py index 0decc330f9..2bd1b388f5 100644 --- a/kernel/trunk/test/common/__init__.py +++ b/kernel/trunk/test/common/__init__.py @@ -103,11 +103,13 @@ def run_qemu(): qemu_directory = get_file_directory(qemu_full_path) flags += f"-L {qemu_directory} " s = f"{qemu_command} {flags}" + qemu_stdout = open("qemu_stdout.log", "w") + qemu_stderr = open("qemu_stderr.log", "w") if is_win32(): - return subprocess.Popen(s, bufsize = 0, stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL, stdin = subprocess.DEVNULL, shell = True, start_new_session = True) + return subprocess.Popen(s, bufsize = 0, stdout = qemu_stdout, stderr = qemu_stderr, stdin = subprocess.DEVNULL, shell = True, start_new_session = True) else: a = shlex.split(s) - return subprocess.Popen(a, bufsize = 0, stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL, stdin = subprocess.DEVNULL, start_new_session = True) + return subprocess.Popen(a, bufsize = 0, stdout = qemu_stdout, stderr = qemu_stderr, stdin = subprocess.DEVNULL, start_new_session = True) def run(): if os.path.exists("debug.log"):