Skip to content

Commit d8191af

Browse files
committed
scripts: add configurable timeout parameter to override default wait
Introcude args.timeout (default 5.0) allowing users to pass greater thresholds for tests that naturally take longer to exhibit initial output gaps. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent c4a1ef4 commit d8191af

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

scripts/sof-qemu-run.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def main():
8585
parser.add_argument("--qemu-d", default="in_asm,nochain,int", help="Options to pass to QEMU's -d flag. Defaults to 'in_asm,nochain,int'.")
8686
parser.add_argument("--ztest", action="store_true", help="Automatically compile the firmware image with ztest_overlay.conf prior to booting.")
8787
parser.add_argument("--rebuild", action="store_true", help="Rebuild the firmware before running; otherwise, assumes firmware is already built.")
88+
parser.add_argument("--timeout", type=float, default=5.0, help="Seconds to wait after the last log event before dumping registers (default: 5.0).")
8889
args = parser.parse_args()
8990

9091
# Make absolute path just in case
@@ -268,8 +269,8 @@ def main():
268269
print("\n\n[sof-qemu-run] Detected 'halting system' in mtrace log! Breaking...")
269270
break
270271

271-
if time.time() - last_active_time >= 5.0:
272-
print("\n\n[sof-qemu-run] 5 seconds passed since last log event. Checking status...")
272+
if time.time() - last_active_time >= args.timeout:
273+
print(f"\n\n[sof-qemu-run] {args.timeout} seconds passed since last log event. Checking status...")
273274
break
274275

275276
except KeyboardInterrupt:

0 commit comments

Comments
 (0)