Dear Lava-Team,
I contacted you a few weeks ago for some help with the integration of a new device. We got a bit further thanks to you but we’re faceing some new issues
and we hoped that you could help us with this.
We are using the official
Docker-Compose repository and specified a new device dictionary on the server container. As
a device type we use a newly created device type that extends base-fastboot device-type, which looks like this:
{% extends 'rse22.jinja2' %}
{% set power_on_command = 'python ./root/power-control/ppson.py' %}
{% set power_off_command = 'python ./root/power-control/ppsoff.py' %}
{% soft_reboot_command = 'reboot' %}
{% hard_reset_command = 'python ./root/power-control/ppsoff.py && sleep 5 && python ./root/power-control/ppson.py' %}
{% set connection_list = [uart0] %}
{% set connection_commands = {uart0: telnet <ip_host_machine> 7101} %}
{% set connection_tags = {uart0: [primary, 'telnet']} %}
But with this we received the following error:
The error disappeared however when we removed the following lines:
{% set power_on_command = 'python ./root/power-control/ppson.py' %}
{% set power_off_command = 'python ./root/power-control/ppsoff.py' %}
{% soft_reboot_command = 'reboot' %}
{% hard_reset_command = 'python ./root/power-control/ppsoff.py && sleep 5 && python ./root/power-control/ppson.py' %}
With those lines we are trying to trigger the scripts, which control our power supply directly. Do we have to pay attention to the python dependencies
in the scripts or could the error be in the definition itself?
We thought, that we had at least configured the device dictionary sufficiently to have a connection to the device and start a very basic health check.
Our device runs Linux, which is running Android on top. The Ser2Net connection has been configured according to the instructions on the repo as well (using the telnet command by itself worked fine).
So we specified the health check like this:
device_type: rsu
job_name: Health Check for RSU
timeouts:
job:
minutes: 30
action:
minutes: 5
connection:
minutes: 2
priority: medium
visibility: public
actions:
- deploy:
namespace: tlxc
timeout:
minutes: 5
to: lxc
packages:
- android-tools-adb
- android-tools-fastboot
- boot:
method: lxc
prompts:
- 'root@(.*):/#'
timeout:
minutes: 5
- test:
timeout:
minutes: 4
definitions:
- repository:
metadata:
format: Lava-Test Test Definition 1.0
name: hello-world
description: "say hello"
os:
- android
scope:
- functional
run:
steps:
- apt -q update
- pwd
- echo "echo hello"
# remember to use -y to allow apt to proceed without interaction
# -q simplifies the apt output for logging.
from: inline
name: hello-world
path: inline/hello-world.yaml
When executing, we got the following error:
Could you please give us some advice, on how to define a test job/health check for a device, which uses fast-boot and Android?
Your help would be greatly appreciated.
Best regards,
Marcel