ci/lava: make rootfs shell prompt configurable

Add support for setting rootfs shell prompt. This is optional and
defaults to "lava-shell:" if not specified.

Signed-off-by: Vignesh Raman <vignesh.raman@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35961>
This commit is contained in:
Vignesh Raman 2025-07-07 07:29:59 +05:30 committed by Marge Bot
parent 75d1ac4b0b
commit d67436c7ec
4 changed files with 7 additions and 3 deletions

View file

@ -404,6 +404,7 @@ class LAVAJobSubmitter(PathResolver):
device_type: str
farm: str
job_timeout_min: int # The job timeout in minutes
shell_prompt: str = "lava-shell:"
dtb_filename: str = None
dump_yaml: bool = False # Whether to dump the YAML payload to stdout
first_stage_init: str = None

View file

@ -151,7 +151,7 @@ def tftp_boot_action(args: "LAVAJobSubmitter") -> dict[str, Any]:
tftp_boot = {
"failure_retry": NUMBER_OF_ATTEMPTS_LAVA_BOOT,
"method": args.boot_method,
"prompts": ["lava-shell:"],
"prompts": [args.shell_prompt],
"commands": "nfs",
}
@ -162,7 +162,7 @@ def qemu_boot_action(args: "LAVAJobSubmitter") -> dict[str, Any]:
qemu_boot = {
"failure_retry": NUMBER_OF_ATTEMPTS_LAVA_BOOT,
"method": args.boot_method,
"prompts": ["lava-shell:"],
"prompts": [args.shell_prompt],
}
return qemu_boot
@ -174,7 +174,7 @@ def fastboot_boot_action(args: "LAVAJobSubmitter") -> dict[str, Any]:
"docker": {"image": DOCKER_IMAGE},
"failure_retry": NUMBER_OF_ATTEMPTS_LAVA_BOOT,
"method": args.boot_method,
"prompts": ["lava-shell:"],
"prompts": [args.shell_prompt],
"commands": ["set_active a"],
}

View file

@ -80,6 +80,7 @@ def lava_job_submitter(
mock_setup_lava_proxy.return_value = mock_proxy()
yield LAVAJobSubmitter(
boot_method="test_boot",
shell_prompt="lava-shell:",
device_type="test_device",
farm="test_farm",
job_timeout_min=1,

View file

@ -47,6 +47,7 @@ def job_submitter_factory(mode: Literal["UBOOT", "FASTBOOT"], shell_file):
boot_method = "fastboot"
device_type = "my_fastboot_device_type"
shell_prompt = "lava-shell:"
job_timeout_min = 10
mesa_job_name = "dut test"
pipeline_info = "my_pipeline_info"
@ -55,6 +56,7 @@ def job_submitter_factory(mode: Literal["UBOOT", "FASTBOOT"], shell_file):
return LAVAJobSubmitter(
boot_method=boot_method,
shell_prompt=shell_prompt,
device_type=device_type,
farm="test_farm",
dtb_filename="my_dtb_filename",