wait_for_console_pattern
Wait for a regex pattern in a UART console stream, checking history first, then blocking until match or timeout. Ideal for detecting boot messages, login prompts, or errors after reset.
Instructions
Wait for a line matching regex pattern in target UART console stream.
First checks recent buffer history (unless check_history=False). If not found, blocks until matching line appears or timeout expires. Ideal for waiting for bootloader, kernel messages, login prompts or errors after reset.
Args: pattern: Regular expression to match (e.g. 'login:', r'(?:[$#]\s*$|\w+@\w+:.[$#]\s)', or 'kernel panic'). timeout: Maximum seconds to wait (default: 30.0s). check_history: If True, inspect recent buffered lines first before waiting for new lines (default: True).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pattern | Yes | ||
| timeout | No | ||
| check_history | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||