Files
Filip Gołaś dbfb729875 Creating custom linux bootentries (#1221)
* util/bootentries-fix.robot: Add PoC for adding bootentries

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* options-lib_dcu.robot: Fix faulty comparison of bootid to empty

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* lib/flash.robot: Add bootorder replacement when flashing fw and tesing via ssh

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* Execute Reboot Command: Use BOOTED_OS_ID to determine reboot type

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* novacustom-v540tu.robot: Resture Ubuntu as default boot os

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* lib/custom_bootentries.robot: Add library for managing bootorder

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* lib/flash.robot: Migrate smmstore when flashing without access to serial

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* util/bootentries-fix.robot: Clean up the suite

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* util/bootentries-fix.robot: Move to self-tests/bootentries-persistence.robot

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* util/basic-platform-setup: Add BPS005.002 for creating defaultboot entires

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* BPS009: Add suite that adds DEFAULT_BOOT_OS_ID entry

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* bootentries-persistence.robot: Make it depend on basic platform setup done

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* lib/custom_bootentries.robot: Make sure esp are skipped

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* environment-test-ids.py: Extend Windows bootmenu name

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* BPS009: make sure windows bootentry is created

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

* Execute Shutdown Command: Skip if no POWER_CTRL

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>

---------

Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
2026-02-04 16:39:03 +01:00

68 lines
2.6 KiB
Plaintext

*** Settings ***
Library Collections
Library Telnet timeout=30 seconds connection_timeout=120 seconds
Library SSHLibrary timeout=90 seconds
Resource ../variables.robot
Resource ../keywords.robot
Resource ../keys.robot
Resource ../lib/custom_bootentries.robot
Suite Setup Run Keyword
... Prepare Test Suite
Suite Teardown Run Keyword
... Log Out And Close Connection
Default Tags automated
*** Test Cases ***
Bootorder Persistence Via SSH
[Documentation] Tests if the DEFAULT_BOOT_OS is persistently the first
... bootentry in the bootorder across a couple problematic scenarios.
... Prerequisite: Run `util/basic-platform-setup.robot` (BPS009)
Skip If '${OPTIONS_LIB}' != 'options-lib_dcu' Only supported when testing via SSH without Serial
Power On
Boot System Or From Connected Disk ${DEFAULT_BOOT_OS_ID}
Log In To Linux
Switch To Root User
${label}= Get From Dictionary ${ENV_ID_OS_BOOTMENU_NAMES} ${DEFAULT_BOOT_OS_ID}
${custom_bootname}= Get Custom Bootentry Name ${DEFAULT_BOOT_OS_ID}
${custom_bootnum}= Get Bootnum For Label ${custom_bootname}
${bootorder}= Get BootOrder
Log BootOrder at start: ${bootorder} level=WARN
BootOrder Should Start With Bootnum ${bootorder} ${custom_bootnum}
Set UEFI Option NetworkBoot ${TRUE}
Power On
Boot System Or From Connected Disk ${DEFAULT_BOOT_OS_ID}
Login To Linux
Switch To Root User
${bootorder}= Get BootOrder
Log BootOrder immediately after Set UEFI Option: ${bootorder} level=WARN
Login To Windows
Execute Reboot Command
Boot System Or From Connected Disk ${DEFAULT_BOOT_OS_ID}
Login To Linux
Switch To Root User
${bootorder}= Get BootOrder
Log BootOrder after booting Windows: ${bootorder} level=WARN
BootOrder Should Start With Bootnum ${bootorder} ${custom_bootnum}
Flash Via Internal Programmer ${FW_FILE} region=bios
${bootorder}= Get BootOrder
Log BootOrder immediately after flashing: ${bootorder} level=WARN
BootOrder Should Start With Bootnum ${bootorder} ${custom_bootnum}
Execute Reboot Command assume_correct_boot=${TRUE}
Sleep 10s
Boot System Or From Connected Disk ${DEFAULT_BOOT_OS_ID}
Log In To Linux
Switch To Root User
${bootorder}= Get BootOrder
Log BootOrder after reboot: ${bootorder} level=WARN
BootOrder Should Start With Bootnum ${bootorder} ${custom_bootnum}