From c582c8b648e0623c3f8bf707ba4fb89bacf0b8ea Mon Sep 17 00:00:00 2001 From: "Magomed Kostoev (mkostoevr)" Date: Fri, 5 Nov 2021 09:17:31 +0000 Subject: [PATCH] [KERNEL][TEST] Wait for debug.log more reliable git-svn-id: svn://kolibrios.org@9254 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/test/common/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/trunk/test/common/__init__.py b/kernel/trunk/test/common/__init__.py index 8fb82d6427..bbc21d7fee 100644 --- a/kernel/trunk/test/common/__init__.py +++ b/kernel/trunk/test/common/__init__.py @@ -19,7 +19,9 @@ class TestFailureException(Exception): class Qemu: def __init__(self, popen): self.popen = popen - self.wait() # qemu needs time to create debug.log file + # Qemu needs time to create debug.log file + while not os.path.exists("debug.log"): + self.wait() def wait_for_debug_log(self, needle, timeout = 1): needle = bytes(needle, "utf-8") @@ -61,6 +63,7 @@ class Qemu: time.sleep(seconds) def run(): + os.remove("debug.log") s = f"qemu-system-i386 -nographic -L . -m 128 -drive format=raw,file=../../kolibri_test.img,index=0,if=floppy -boot a -vga vmware -net nic,model=rtl8139 -net user -soundhw ac97 -debugcon file:debug.log" a = shlex.split(s) popen = subprocess.Popen(a, bufsize = 0, stdout = subprocess.DEVNULL, stderr = subprocess.DEVNULL, stdin = subprocess.DEVNULL, start_new_session = True)