From c1dbeb55b4eaa3e0af07eb594147caed5e85f503 Mon Sep 17 00:00:00 2001 From: hathach Date: Wed, 29 Nov 2023 18:11:50 +0700 Subject: [PATCH] increase intial sleep for port check, otherwise it ccould fail on pi4 --- test/hil/hil_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/hil/hil_test.py b/test/hil/hil_test.py index c90cf363c..b307a45f6 100644 --- a/test/hil/hil_test.py +++ b/test/hil/hil_test.py @@ -65,13 +65,14 @@ def open_serial_dev(port): if os.path.exists(port): try: # slight delay since kernel may occupy the port briefly - time.sleep(0.2) + time.sleep(0.5) + timeout = timeout - 0.5 ser = serial.Serial(port, timeout=1) break except serial.SerialException: pass - time.sleep(0.8) - timeout = timeout - 1 + time.sleep(0.5) + timeout = timeout - 0.5 assert timeout, 'Device not available or Cannot open port' return ser