tbottest.connector
¶
A module containing various additional connectors:
KermitConnector
- Console on localhost using kermit.PicocomConnector
- Console on localhost using picocom.ScriptConnector
- Console on localhost using a script.
- class tbottest.connector.KermitConnector(mach: LinuxShell)[source]¶
Bases:
ConsoleConnector
Connect to a serial console using kermit
You can configure the device name using the
kermit_cfg_file
property.Example: (board config)
from tbot.machine import board from tbottest.connector import KermitConnector class MyBoard(KermitConnector, board.Board): kermit_cfg_file = "path to config file" BOARD = MyBoard
- Parameters:
mach (LinuxShell) – A cloneable lab-host machine. The
ConsoleConnector
will try to clone this machine’s connection and use that to connect to the board. This means that you have to make sure you give the correct lab-host for your respecitive board to the constructor here.
- class tbottest.connector.PicocomConnector(mach: LinuxShell)[source]¶
Bases:
ConsoleConnector
Connect to a serial console using picocom
Example: (board config)
from tbot.machine import board from tbottest.connector import PicocomConnector class MyBoard(PicocomConnector, board.Board): baudrate = 115200 device = /dev/serial/by-id/usb-Prolific_Technology_Inc._USB-Serial_Controller-if00-port0 noreset BOARD = MyBoard
- Parameters:
mach (LinuxShell) – A cloneable lab-host machine. The
ConsoleConnector
will try to clone this machine’s connection and use that to connect to the board. This means that you have to make sure you give the correct lab-host for your respecitive board to the constructor here.
- class tbottest.connector.ScriptConnector(mach: LinuxShell)[source]¶
Bases:
ConsoleConnector
Connect to a serial console using a script
Example: (board config)
from tbot.machine import board from tbottest.connector import PicocomConnector class MyBoard(ScriptConnector, board.Board): scriptname = "connect" exitstring = ~~. boardname = wandboard BOARD = MyBoard
- Parameters:
mach (LinuxShell) – A cloneable lab-host machine. The
ConsoleConnector
will try to clone this machine’s connection and use that to connect to the board. This means that you have to make sure you give the correct lab-host for your respecitive board to the constructor here.