Skip to content

Commit

Permalink
feat(job): Add compat field to job
Browse files Browse the repository at this point in the history
Compat field used to report to kcidb parameters/info about device.

Signed-off-by: Denys Fedoryshchenko <[email protected]>
  • Loading branch information
nuclearcat committed Aug 22, 2024
1 parent d4ac730 commit 4a31561
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions kernelci/config/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ class Job(YAMLConfigObject):

# pylint: disable=too-many-arguments
def __init__(self, name, template, kind="node", image=None, params=None, rules=None,
kcidb_test_suite=None):
kcidb_test_suite=None, compat=None):
self._name = name
self._template = template
self._kind = kind
self._image = image
self._kcidb_test_suite = kcidb_test_suite
self._compat = compat
self._params = self.format_params(params.copy(), params) if params else {}
self._rules = rules

Expand Down Expand Up @@ -59,10 +60,15 @@ def kcidb_test_suite(self):
"""Mapping of KernelCI test to KCIDB test suite"""
return self._kcidb_test_suite

@property
def compat(self):
"""Compatibility requirements"""
return self._compat

@classmethod
def _get_yaml_attributes(cls):
attrs = super()._get_yaml_attributes()
attrs.update({'template', 'kind', 'image', 'params', 'rules', 'kcidb_test_suite'})
attrs.update({'template', 'kind', 'image', 'params', 'rules', 'kcidb_test_suite', 'compat'})
return attrs


Expand Down

0 comments on commit 4a31561

Please sign in to comment.