1.1.2.1.1. test_automation.configs.config
Central loader for config, with optional BUILD_IMAGE_DIR and FVP_BINARY substitution. Supports both list- and mapping-style ‘platforms’ sections in YAML.
1.1.2.1.1.1. Classes
| Central config loader to load YAML, set environment variable and expose | 
1.1.2.1.1.2. Functions
| 
 | Expand ${ENV} in all strings. | 
| 
 | Set process environment variables for FVP configuration. | 
| 
 | Load YAML configuration from a file and expand environment variables. | 
| 
 | Normalize the  | 
1.1.2.1.1.3. Module Contents
- test_automation.configs.config._expand(obj)[source]
- Expand ${ENV} in all strings. - Parameters:
- obj (Any) – Python objects like strings, lists, and dictionaries are transformed. 
- Returns:
- The environment variables and user-home markers expanded wherever applicable. 
- Return type:
- Any 
 
- test_automation.configs.config._set_env_vars(build_dir, fvp_binary)[source]
- Set process environment variables for FVP configuration. - Parameters:
- build_dir (Optional[str]) – Path to set as - BUILD_DIR. If- None, the variable is not set.
- fvp_binary (Optional[str]) – Path to set as - FVP_BINARY. If- None, the variable is not set.
 
- Returns:
- None 
- Return type:
- None 
 
- test_automation.configs.config._load_yaml_expanded(path)[source]
- Load YAML configuration from a file and expand environment variables. - Parameters:
- path (str) – Path to a YAML configuration file. 
- Returns:
- Parsed and expanded YAML content as a dictionary. 
- Raises:
- FileNotFoundError – If the YAML file cannot be found. 
- yaml.YAMLError – If the YAML content cannot be parsed. 
 
- Return type:
- Dict[str, Any] 
 
- test_automation.configs.config._normalize_platforms(data)[source]
- Normalize the - platformssection of the YAML configuration.- Ensures platforms are returned as a dictionary keyed by platform name, regardless of whether the YAML used mapping or list style. - Parameters:
- data (Dict[str, Any]) – Parsed and expanded YAML configuration. 
- Returns:
- Mapping of platform name to platform configuration dictionary. 
- Return type:
- Dict[str, Dict[str, Any]] 
 
- class test_automation.configs.config.Config(path, build_dir=None, fvp_binary=None)[source]
- Central config loader to load YAML, set environment variable and expose platforms as a dict keyed by name. - Parameters:
- path (str) 
- build_dir (Optional[str]) 
- fvp_binary (Optional[str]) 
 
 - get_platform(name)[source]
- Return the configuration dictionary for a specific platform. - Parameters:
- name (str) – Platform name key as defined in the YAML - platforms.
- Returns:
- The platform configuration mapping for - name.
- Raises:
- KeyError – If - nameis not present in- platforms.
- Return type:
- Dict[str, Any]