This page contains information on using the LAVA CI project on R-Car platforms.
It is not intended as a complete 'end to end' tutorial on running LAVA. There are numerous sources for such tutorials including the official LAVA documentation. Instead, the aim is to explain nuances of using R-Car platforms in LAVA and to accelerate integration.
DUT = Device Under Test, e.g. hardware platform to be tested
LAVA interacts with the DUT via a serial console. A typical test job will involve restarting the DUT through a power cycle. This can be for multiple reasons. Power cycling means each job starts with the same setup for example. Another is restarting after flashing the DUT to use the flashed software.
The challenge is therefore for LAVA to maintain a serial console connection through such resets. Some R-Car platforms reset the serial on power on causing LAVA to lose the ser2net/telnet console link and therefore its ability to control the DUT. This can be mitigated by setting the LOCAL option for the DUT in the LAVA Worker ser2net configuration file.
If you are managing your LAVA instance using lava-docker (a project that simplifies LAVA instances using Docker) you can automate this by setting the option in your boards.yaml:
ser2net_options: - LOCAL
AOSP brings a complication to a LAVA instance because of the need to run tools such as ADB and Fastboot on the Host which then communicate with the DUT. LAVA needs to be able to handle running different versions of these tools and to support the DUT discovery and communication.
Different host tooling versions are supported by running them on the host in LXC or Docker containers. LXC is now considered legacy support and Docker is strongly recommended. See the LAVA documentation for details. When LAVA is itself running in a Docker container, such as when using lava-docker, the host tooling containers are run as a sibling of the LAVA container not a child.
Fastboot and ADB use serial numbers to find DUTs. LAVA uses the host package [lava-dispatcher-host https://packages.debian.org/unstable/net/lava-dispatcher-host] to find the DUT and share it into the Docker container specified in the test job. For that to succeed we must describe each serial number to LAVA. How to do that for R-Car is described in the section on device definitions below.
<TBA 1. extending device dictionary>
<TBA 2. extending device-type template>
<2.1. LXC side effect>
If you are using lava-docker you tell LAVA the serial number for the DUT in the boards.yaml. This can be done in a custom_option block for the DUT.
custom_option: - "set fastboot_serial_number = '00012345'" - "set adb_serial_number = '00012345'"
<TBA how to flash using R-Car flash script>