API

This part of the documentation covers all the interfaces of Flask. For parts where Flask depends on external libraries, we document the most important right here and provide links to the canonical documentation.

Application Object

class octoprobe.octoprobe.CtxTestRun(connected_tentacles: Sequence[TentacleBase])[source]

The context of a test run

function_setup_infra(udev_poller: UdevPoller, tentacle: TentacleBase) None[source]

Power off all other known usb power plugs.

For each active tentacle:

  • Power on infa

  • Flash firmware

  • Get serial numbers and assert if it does not match the config

  • Return tty

static session_powercycle_tentacles() UsbTentacles[source]

Powers all RP2 infra. Finds all tentacle by finding rp2_unique_id of the RP2 infra.

class octoprobe.util_baseclasses.TentacleSpecBase(tentacle_type: ~enum.StrEnum, tentacle_tag: str, futs: list[~enum.StrEnum], doc: str, tags: str, relays_closed: dict[~enum.StrEnum | None, list[int]] = <factory>, mcu_usb_id: ~octoprobe.util_baseclasses.BootApplicationUsbID | None = None, programmer_args: list[str] = <factory>)[source]

Specification for a Tentacle, for example:

>>> TentacleSpec(
    tentacle_type=TentacleType.TENTACLE_MCU,
    futs=[EnumFut.FUT_I2C, EnumFut.FUT_UART],
    label="pico",
    tags="boards=RPI_PICO,mcu=rp2,programmer=picotool",

This class is heavely used in testcode and therefore has to support typehints and code completion to ease the work of writing/maintaining testcode.

Therefore this class uses generics. which allows to define parts of this class on testbed level.

get_tag(tag: str) str | None[source]

Find a tag in a string like boards=RPI_PICO,mcu=rp2,programmer=picotool.

Parameters:

tag (str) – mcu in above string

Returns:

In this example: rp2

Return type:

str | None

programmer_args: list[str]

Special argumets…

relays_closed: dict[StrEnum | None, list[int]]

If the key is None, the value defines the relays to be closed by default.