1.1.3.1.1.1.2. test_automation.targets.fvp.fvp_controller
1.1.3.1.1.1.2.1. Attributes
1.1.3.1.1.1.2.2. Exceptions
| Base exception for FVP related errors. | |
| Raised when the FVP fails to start. | |
| Raised when the FVP does not become ready within | |
| Raised when the FVP process is unexpectedly stopped. | 
1.1.3.1.1.1.2.3. Classes
| Local FVP controller to start/stop/reset an FVP process using parameters | 
1.1.3.1.1.1.2.4. Module Contents
- exception test_automation.targets.fvp.fvp_controller.FVPError[source]
- Bases: - RuntimeError- Base exception for FVP related errors. 
- exception test_automation.targets.fvp.fvp_controller.FVPStartError[source]
- Bases: - FVPError- Raised when the FVP fails to start. 
- exception test_automation.targets.fvp.fvp_controller.FVPTimeout[source]
- Bases: - FVPError- Raised when the FVP does not become ready within the expected timeout. 
- exception test_automation.targets.fvp.fvp_controller.FVPStopped[source]
- Bases: - FVPError- Raised when the FVP process is unexpectedly stopped. 
- class test_automation.targets.fvp.fvp_controller.LocalFVP(platform_config, *args, **options)[source]
- Bases: - test_automation.utils.device.Device- Local FVP controller to start/stop/reset an FVP process using parameters from YAML. - Parameters:
- platform_config (dict) 
 - _init_required_fields(platform_config)[source]
- Populate fields derived directly from the platform configuration. - Parameters:
- platform_config (dict) – Parsed platform configuration mapping. 
- Returns:
- None
- Return type:
- None 
 
 - _init_optional_and_telnet(platform_config, args, options)[source]
- Resolve optional log settings and initialize the Telnet manager. - Parameters:
- platform_config (dict) – Parsed platform configuration mapping. 
- args (tuple) – Legacy positional args. If present, the first element may be a - TelnetSessionManagerinstance.
- options (dict) – Keyword options that may include: * log_dir (str, optional) – Override log directory path. * log_prefix (str, optional) – Override log filename prefix. * telnet_log_dir (str, optional) – Directory for Telnet logs. * telnet_manager (TelnetSessionManager, optional) – Telnet session manager instance. Defaults to a new instance. 
 
- Returns:
- None
- Return type:
- None 
 
 - start()[source]
- Start the FVP process with the configured parameters. - Raises:
- FVPStartError – If the FVP process fails to start. 
- Return type:
- None 
 
 - _signal(sig)[source]
- Send a signal to the FVP process or its process group. - Parameters:
- sig (int) – Signal number (e.g. - signal.SIGTERM).
- Returns:
- None
- Return type:
- None 
 
 - _terminate_proc()[source]
- Terminate the FVP process normally, then forcefully if needed. - Return type:
- None 
 
 - stop()[source]
- Stop the FVP process and clean up telnet sessions. Ensures the reader thread exits, the process is terminated, and all telnet sessions are closed. - Return type:
- None 
 
 - reset()[source]
- Restart the FVP process so the device returns to a known-good state. If it’s running, stop then start; otherwise just start. - Return type:
- None 
 
 - wait_ready(timeout_s=None)[source]
- Block until the FVP is ready or the timeout expires. - Parameters:
- timeout_s (Optional[int]) – Timeout in seconds. Defaults to configured ready_timeout_s. 
- Raises:
- FVPTimeout – If the FVP is not ready within the timeout. 
- Return type:
- None 
 
 - log_path()[source]
- Get the path to the current boot log file. - Raises:
- FVPError – If start() has not been called yet. 
- Return type:
- pathlib.Path 
 
 - _process_stdout_line(line, pattern, first_port_seen)[source]
- Process one line of FVP stdout, update ports, and set readiness state. - Parameters:
- line (str) – A single line from the FVP process stdout. 
- pattern (re.Pattern[str]) – Compiled regex to match terminal/port info. 
- first_port_seen (bool) – Whether a port was already discovered before. 
 
- Returns:
- True if this line contained the first discovered port, otherwise the prior - first_port_seenvalue.
- Return type:
- bool