Add option for softwareComponentBase
This setting changes the ASIL classification of the software component by adding the swcbase key to the yaml file. ZC projects only. Change-Id: Ic94dbb3cb4ca617f4637066d50ee0817e1e923cc
This commit is contained in:
parent
73eca42a6a
commit
c1e138cb47
@ -276,6 +276,10 @@ class BuildProjConfig:
|
||||
"""Returns the software component template to use."""
|
||||
return self._prj_cfg['ProjectInfo'].get('softwareComponentTemplate')
|
||||
|
||||
def get_swc_base(self):
|
||||
"""Returns the software component base to use (ASIL classification)."""
|
||||
return self._prj_cfg['ProjectInfo'].get('softwareComponentBase', 'QM')
|
||||
|
||||
def get_car_com_dst(self):
|
||||
"""Return the absolute path to the source output folder."""
|
||||
return os.path.join(self.get_root_dir(),
|
||||
|
@ -396,6 +396,7 @@ class CompositionYaml(ProblemLogger):
|
||||
"""
|
||||
software_component_name = self.build_cfg.get_swc_name()
|
||||
software_component_template = self.build_cfg.get_swc_template()
|
||||
software_component_base = self.build_cfg.get_swc_base()
|
||||
data_types = {
|
||||
**self.cal_class_info["autosar"]["data_types"],
|
||||
**self.meas_class_info["autosar"]["data_types"],
|
||||
@ -404,6 +405,8 @@ class CompositionYaml(ProblemLogger):
|
||||
swcs[software_component_name]["type"] = "SWC" # Other types than swc??
|
||||
if software_component_template is not None:
|
||||
swcs[software_component_name]["template"] = software_component_template
|
||||
if software_component_base is not None:
|
||||
swcs[software_component_name]["swcbase"] = software_component_base
|
||||
swcs[software_component_name]["runnables"] = self._get_runnable_info()
|
||||
swcs[software_component_name]["shared"] = self.cal_class_info["autosar"]["class_info"]
|
||||
swcs[software_component_name]["static"] = self.meas_class_info["autosar"]["class_info"]
|
||||
|
@ -10,6 +10,7 @@ expected_result = {
|
||||
"testName_SC": {
|
||||
"type": "SWC",
|
||||
"template": "ARTCSC",
|
||||
"swcbase": "QM",
|
||||
"runnables": {
|
||||
"AR_prefix_VcExtINI": {
|
||||
"type": "INIT",
|
||||
@ -39,6 +40,7 @@ expected_cal_result = {
|
||||
"testName_SC": {
|
||||
"type": "SWC",
|
||||
"template": "ARTCSC",
|
||||
"swcbase": "QM",
|
||||
"runnables": {
|
||||
"AR_prefix_VcExtINI": {
|
||||
"type": "INIT",
|
||||
|
@ -151,6 +151,7 @@ expected_result = {
|
||||
"testName_SC": {
|
||||
"type": "SWC",
|
||||
"template": "ARTCSC",
|
||||
"swcbase": "QM",
|
||||
"runnables": {
|
||||
"AR_prefix_VcExtINI": {
|
||||
"type": "INIT",
|
||||
|
@ -10,6 +10,7 @@ expected_result = {
|
||||
"testName_SC": {
|
||||
"type": "SWC",
|
||||
"template": "ARTCSC",
|
||||
"swcbase": "QM",
|
||||
"runnables": {
|
||||
"AR_prefix_VcExtINI": {
|
||||
"type": "INIT",
|
||||
|
@ -10,6 +10,7 @@ expected_result = {
|
||||
"testName_SC": {
|
||||
"type": "SWC",
|
||||
"template": "ARTCSC",
|
||||
"swcbase": "QM",
|
||||
"runnables": {
|
||||
"AR_prefix_VcExtINI": {
|
||||
"type": "INIT",
|
||||
|
@ -42,6 +42,7 @@ expected_result = {
|
||||
"testName_SC": {
|
||||
"type": "SWC",
|
||||
"template": "ARTCSC",
|
||||
"swcbase": "QM",
|
||||
"runnables": {
|
||||
"AR_prefix_VcExtINI": {
|
||||
"type": "INIT",
|
||||
|
@ -33,6 +33,7 @@ expected_result = {
|
||||
"testName_SC": {
|
||||
"type": "SWC",
|
||||
"template": "ARTCSC",
|
||||
"swcbase": "QM",
|
||||
"runnables": {
|
||||
"AR_prefix_VcExtINI": {
|
||||
"type": "INIT",
|
||||
|
@ -50,6 +50,7 @@ class TestCompositionYaml(unittest.TestCase):
|
||||
self.build_cfg.get_composition_name = MagicMock(return_value="compositionName")
|
||||
self.build_cfg.get_swc_name = MagicMock(return_value="testName_SC")
|
||||
self.build_cfg.get_swc_template = MagicMock(return_value="ARTCSC")
|
||||
self.build_cfg.get_swc_base = MagicMock(return_value="QM")
|
||||
self.build_cfg.get_gen_ext_impl_type = MagicMock(return_value=True)
|
||||
self.build_cfg.get_code_generation_config = MagicMock(return_value=False)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user