Skip to content

Commit 11d6613

Browse files
committed
tests: mctpenv: insert VDM types by default, but allow manual control
Currently, we use a default [0] for our types list, but do not inspect the vdm types to augment with 7e/7f. Use the provided VDM types to also populate the base types by default, but still allow an explicit types argument to override. Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
1 parent 31dad84 commit 11d6613

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/mctpenv/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,12 @@ def __init__(
386386
self.lladdr = lladdr
387387
self.uuid = ep_uuid or uuid.uuid1()
388388
self.eid = eid
389-
self.types = types or [0]
390389
self.vdm_msg_types = vdm_msg_types or []
390+
vdm_set = set([t.msgtype for t in self.vdm_msg_types])
391+
if types is None:
392+
self.types = [0] + list(vdm_set)
393+
else:
394+
self.types = types
391395
self.bridged_eps = []
392396
self.allocated_pool = None # or (start, size)
393397

0 commit comments

Comments
 (0)