2.1.2.1.7. tests.utils.session_utils
2.1.2.1.7.1. Attributes
2.1.2.1.7.2. Functions
|
Wait for a specific pattern to appear in a live pexpect session. |
|
Power cycle the FVP instance and restore console connectivity. |
|
Complete login sequence and wait for root shell prompt. |
2.1.2.1.7.3. Module Contents
- tests.utils.session_utils.expect_pattern_live(session, pattern, timeout, msg, level='info')[source]
Wait for a specific pattern to appear in a live pexpect session.
- Parameters:
session (pexpect.spawn) – Active pexpect session instance.
pattern (str) – Pattern to wait for in the session output.
timeout (int) – Maximum time (in seconds) to wait.
msg (str) – Log message to emit if a timeout occurs.
level (str) – Logging level to use.
- Returns:
True if the pattern is matched within the timeout
- Return type:
bool
- tests.utils.session_utils.fvp_power_cycle_and_reconnect(platform_base_obj, platform_bundle, boot_wait_seconds=0)[source]
Power cycle the FVP instance and restore console connectivity.
- Parameters:
platform_base_obj – Initialized
AutoTestPlatformBase.platform_bundle – Initialized driver bundle.
boot_wait_seconds (int) – Optional delay in seconds
- Returns:
None
- tests.utils.session_utils.login_and_wait_for_shell(session, login_prompt, shell_prompt)[source]
Complete login sequence and wait for root shell prompt.
- Parameters:
login_prompt (str) – login prompt pattern
shell_prompt (str) – shell prompt pattern
session (pexpect.spawn)
- Returns:
None
- Return type:
None