ci/lava: Force LAVA panfrost jobs to use UART

To ensure proper SSH functioning, the device IP should be added to the
LAVA device dictionary by setting device_ip. LAVA will then map the
value to lava-target-ip.

meson-g12b-a311d-khadas-vim3-cbg-4 has an IP in the dictionary, while
sun50i-h6-pine-h64-cbg-1 and meson-g12b-a311d-khadas-vim3-cbg-2 do not.

Since some devices are not yet properly configured, and device tag
fixing is not an option here, let's temporarily switch to a job
definition based on UART, until it gets fixed.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22870>
This commit is contained in:
Guilherme Gallo 2023-05-18 12:15:27 -03:00 committed by Marge Bot
parent 80290bcddd
commit ebdf8a95b7
2 changed files with 23 additions and 8 deletions

View File

@ -19,6 +19,22 @@ NUMBER_OF_ATTEMPTS_LAVA_BOOT = int(getenv("LAVA_NUMBER_OF_ATTEMPTS_LAVA_BOOT", 3
JOB_PRIORITY = int(getenv("LAVA_JOB_PRIORITY", 75))
def has_ssh_support(job_submitter: "LAVAJobSubmitter") -> bool:
force_uart = bool(getenv("LAVA_FORCE_UART", False))
if force_uart:
return False
# Only Collabora's farm supports to run docker container as a LAVA actions,
# which is required to follow the job in a SSH section
current_farm = get_lava_farm()
# SSH job definition still needs to add support for fastboot.
job_uses_fastboot: bool = job_submitter.boot_method == "fastboot"
return current_farm == LavaFarm.COLLABORA and not job_uses_fastboot
def generate_lava_yaml_payload(job_submitter: "LAVAJobSubmitter") -> dict[str, Any]:
"""
Bridge function to use the supported job definition depending on some Mesa
@ -35,14 +51,7 @@ def generate_lava_yaml_payload(job_submitter: "LAVAJobSubmitter") -> dict[str, A
generate_lava_yaml_payload as uart_lava_yaml,
)
# Only Collabora's farm supports to run docker container as a LAVA actions,
# which is required to follow the job in a SSH section
current_farm = get_lava_farm()
# SSH job definition still needs to add support for fastboot.
job_uses_fastboot: bool = job_submitter.boot_method == "fastboot"
if current_farm == LavaFarm.COLLABORA and not job_uses_fastboot:
if has_ssh_support(job_submitter):
return ssh_lava_yaml(job_submitter)
return uart_lava_yaml(job_submitter)

View File

@ -39,6 +39,9 @@ panfrost-t720-gles2:arm64:
DEQP_SUITE: panfrost-t720
FDO_CI_CONCURRENT: 6
RUNNER_TAG: mesa-ci-x86-64-lava-sun50i-h6-pine-h64
# This device network setup is incomplete, so we can't use it for the LAVA
# SSH session. Need to fallback to the serial console.
LAVA_FORCE_UART: 1
# We only have two machines, which we share with KernelCI.
# Keep the second t760 job manual.
@ -102,6 +105,9 @@ panfrost-t860-egl:arm64:
DTB: $DEVICE_TYPE
GPU_VERSION: panfrost-g52
RUNNER_TAG: mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3
# This device network setup is incomplete, so we can't use it for the LAVA
# SSH session. Need to fallback to the serial console.
LAVA_FORCE_UART: 1
panfrost-g52-gl:arm64:
parallel: 3