powertrain-build/test_data/zone_controller/test_composition_yaml/composition_yaml.py
Henrik Wahlqvist b55335a3a4 Adding NVM functionality to composition_yaml
This change does not include generating RTE calls,
it only updates the yaml2arxml input.

Change-Id: I67f32d3c31dccf0b290c6e5c934d71e27b1b439d
2024-10-30 10:54:50 +01:00

105 lines
3.6 KiB
Python

# Copyright 2024 Volvo Car Corporation
# Licensed under Apache 2.0.
"""Unit test data for powertrain_build.zone_controller.composition_yaml."""
from test_data.zone_controller.test_composition_yaml import composition_yaml_setup
expected_result = {
"SoftwareComponents": {
"testName_SC": {
"type": "SWC",
"template": "ARTCSC",
"swcbase": "QM",
"runnables": {
"AR_prefix_VcExtINI": {
"type": "INIT",
"accesses": composition_yaml_setup.base_accesses
},
"AR_prefix_testRunnable": {
"period": 10,
"type": "PERIODIC",
"accesses": composition_yaml_setup.base_accesses
},
},
"diagnostics": {},
"nv-needs": {},
"static": composition_yaml_setup.base_static,
"shared": composition_yaml_setup.base_shared,
"ports": {
"GlobSignNme": {"direction": "IN", "interface": "PIGlobSignNme"}
},
}
},
"DataTypes": composition_yaml_setup.base_data_types,
"PortInterfaces": composition_yaml_setup.base_port_interfaces,
"ExternalFiles": composition_yaml_setup.base_configuration
}
expected_custom_names_result = {
"SoftwareComponents": {
"testName_SC": {
"type": "SWC",
"template": "ARTCSC",
"swcbase": "QM",
"runnables": {
"dummy_init": {
"type": "INIT",
"accesses": composition_yaml_setup.base_accesses
},
"dummy_step": {
"period": 10,
"type": "PERIODIC",
"accesses": composition_yaml_setup.base_accesses
},
},
"diagnostics": {},
"nv-needs": {},
"static": composition_yaml_setup.base_static,
"shared": composition_yaml_setup.base_shared,
"ports": {
"GlobSignNme": {"direction": "IN", "interface": "PIGlobSignNme"}
},
}
},
"DataTypes": composition_yaml_setup.base_data_types,
"PortInterfaces": composition_yaml_setup.base_port_interfaces,
"ExternalFiles": composition_yaml_setup.base_configuration
}
expected_cal_result = {
"SoftwareComponents": {
"testName_SC": {
"type": "SWC",
"template": "ARTCSC",
"swcbase": "QM",
"runnables": {
"AR_prefix_VcExtINI": {
"type": "INIT",
"accesses": composition_yaml_setup.cal_accesses
},
"AR_prefix_testRunnable": {
"period": 10,
"type": "PERIODIC",
"accesses": composition_yaml_setup.cal_accesses
},
"AR_testName_SC_ZcCalibrationStep": {
"period": 0.1,
"type": "PERIODIC",
"accesses": composition_yaml_setup.cal_accesses
}
},
"diagnostics": {},
"nv-needs": {},
"static": composition_yaml_setup.base_static,
"shared": composition_yaml_setup.cal_shared,
"ports": {
"GlobSignNme": {"direction": "IN", "interface": "PIGlobSignNme"}
},
}
},
"DataTypes": composition_yaml_setup.base_data_types,
"PortInterfaces": composition_yaml_setup.base_port_interfaces,
"ExternalFiles": composition_yaml_setup.base_configuration
}