-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
My Device Under Test is defined as below:
MyBoard(connector.ConsoleConnector, board.PowerControler, board.Board)
- power control + establish picocom channel
MyLinux(board.Connector, board.LinuxBootLogin, Bash)
- linux commands via picocom channel
MyLinuxSsh(connector.SSHConnector, Bash)
- linux commands via SSH
def register_machines(ctx):
ctx.register(custom.mach.MyBoard, tbot.role.Board)
ctx.register(custom.mach.MyLinux, tbot.role.BoardLinux)
ctx.register(custom.mach.MyLinuxSsh, custom.role.BoardLinuxSSH)
I'd like to expand my framwork to be able to handle multiple Devices Under Test in one test case. Each instance of a device will have own set of parameters (IP address, /dev/ttyS, etc). I have a question on how to implement such scenario.
I'd like to use it like that:
with tbot.ctx.request(tbot.role.BoardLinux) as linux_1, \
tbot.ctx.request(custom.role.BoardLinux2) as linux_2:
linux_2.exec('ping', '-c3', linux_1.ip_address)
Tbot documentation says that it's possible to have multiple roles for same machine, but in such case how do I know from MyLinux machine which role requested it? I need to know that to determine individual parameters for an instance (IP address, /dev/ttyS, etc). Could you please provide recommended way to handle such scenario?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels