diff --git a/.gitlab-ci/lava/utils/lava_job_definition.py b/.gitlab-ci/lava/utils/lava_job_definition.py index 55dbb902dac..8ac30d891c5 100644 --- a/.gitlab-ci/lava/utils/lava_job_definition.py +++ b/.gitlab-ci/lava/utils/lava_job_definition.py @@ -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) diff --git a/src/panfrost/ci/gitlab-ci.yml b/src/panfrost/ci/gitlab-ci.yml index 4b3815b20ef..85a848a85d7 100644 --- a/src/panfrost/ci/gitlab-ci.yml +++ b/src/panfrost/ci/gitlab-ci.yml @@ -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