Skip to main content

Same tests as the ECU matures

Topology graph of Same tests as the ECU maturesTopology graph of Same tests as the ECU matures

Test · Topology examples v0.9.0

  • Ethernet
  • Gateway

Run it​

git clone https://github.com/remotivelabs/remotivelabs-topology-examples.git
cd remotivelabs-topology-examples

remotive topology build -f ethernet_p2p/instances/model.instance.yaml build

docker compose -f build/ethernet-p2p-model/docker-compose.yml up --build

In a second terminal, run the tests with cd ethernet_p2p/tests and uv run pytest -s -vv.

An ECU under development usually starts as a model, becomes software in a container and ends up as hardware. With RemotiveTopology the tests stay the same through all three: only the instance file that says how the ECU runs changes.

In this example ECUB is a gateway that forwards frames from ECUA on one Ethernet network (NET1) to ECUC on another (NET2). The test sets signals on ECUA and checks that the same values arrive at ECUC.

Build and start the model variant, then run the tests in a second terminal:

remotive topology build -f ethernet_p2p/instances/model.instance.yaml build
docker compose -f build/ethernet-p2p-model/docker-compose.yml up --build

# in another terminal
cd ethernet_p2p/tests
uv run pytest -s -vv

Notice:

  • Swap model for container or external in both commands to test the other variants. The external variant also needs host network setup, see the example README.
  • The test only talks to ECUA and ECUC, which is why it doesn't change when ECUB does.