diff --git a/dasharo-compatibility/sata-detect.robot b/dasharo-compatibility/sata-detect.robot index 9086d05047..77167b6bee 100644 --- a/dasharo-compatibility/sata-detect.robot +++ b/dasharo-compatibility/sata-detect.robot @@ -17,11 +17,25 @@ Suite Teardown Run Keyword *** Test Cases *** -# TODO -# SAT001.001 SATA support in firmware +SAT001.001 SATA support in firmware + [Documentation] This test aims to verify that SATA is detected from FW + Depends On ${TESTS_IN_FIRMWARE_SUPPORT} + Depends On ${SATA_SUPPORT} + + Power On + ${setup_menu}= Enter Setup Menu Tianocore And Return Construction + ${boot_manager_menu}= Enter Submenu From Snapshot And Return Construction + ... ${setup_menu} + ... Boot Maintenance Manager + + ${bff_manager_menu}= Enter Submenu From Snapshot And Return Construction + ... ${boot_manager_menu} + ... Boot From File + + Count Arrows Down To Reach The Option /Sata # this KWD return error if string not found SAT001.201 SATA support in OS (Ubuntu) - [Documentation] This test aims to verify that SATA is detected from OS + [Documentation] This test aims to verify that SATA is detected from Ubuntu ... by using smartctl. Depends On ${TESTS_IN_FIRMWARE_SUPPORT} Depends On ${TESTS_IN_UBUNTU_SUPPORT} @@ -70,6 +84,19 @@ SAT001.401 SATA support in OS (ESXi) Should Contain Any ${out} Vendor: ATA Vendor: SATA Should Contain ${out} Is Boot Device: true +SAT001.301 SATA support in OS (Windows) + [Documentation] This test aims to verify that SATA is detected from Windows + ... by using powershell. + Depends On ${TESTS_IN_FIRMWARE_SUPPORT} + Depends On ${TESTS_IN_UBUNTU_SUPPORT} + Depends On ${SATA_SUPPORT} + + Power On + Login To OS ${ENV_ID_WINDOWS} + ${output}= Execute Command In Terminal + ... Get-PhysicalDisk | Select-Object DeviceID, MediaType, BusType, Model + Should Contain ${output} SATA + *** Keywords *** SATA Support In OS diff --git a/lib/bios/menus.robot b/lib/bios/menus.robot index b444daebc2..74cde9acf2 100644 --- a/lib/bios/menus.robot +++ b/lib/bios/menus.robot @@ -159,7 +159,7 @@ Search For Option Not Visible After Entering Menu # When the menu doesn't require scrolling. Then this KWD is not needed. # Added for compatibility. ELSE - # This is the only that has additional menu title + # This is the only submenu that has additional menu title Remove Values From List ${construction} Devices List ${key_down_qtty}= ... Get Index Of Matching Option In Menu ${construction} ${option} @@ -169,6 +169,54 @@ Search For Option Not Visible After Entering Menu END Fail msg=Option '${option}' not found in menu. +Count Arrows Down To Reach The Option + [Documentation] + ... Reads the serial output in search for the first occurrence of + ... ${option} when it finds the function returns the + ... quantity of ${ARROW_DOWN} presses required to reach that ${option}. + ... It works only if the ${option} is not visible after entering menu. + ... + ... === Requirements === + ... - Boot menu has to be entered using ``Enter Boot Menu Tianocore`` + ... - The serial must not have been read after entering the boot menu + ... if the ${re_enter} is set to false. + ... + ... === Arguments === + ... ``${option}``: ``string`` The first line of the option you want + ... to find. In case options are split into multiple lines make sure to + ... put only the first line of the option as argument. + ... ``${re_enter}``: ``boolean`` - default ``${TRUE}``, skip reentering + ... menu at the start of the keyword when ``${FALSE}``. + ... + ... === Return Value === + ... - ``int`` - The quantity of ${ARROW_DOWN} presses required to + ... reach that ${option} + ... + ... === Effects === + ... - The submenu is read from the serial buffer + [Arguments] ${option} ${re_enter}=${TRUE} + + IF ${re_enter} Reenter Menu + ${menu}= Read From Terminal Until Exit + # Lines to strip: + # UP + # Devices List - in Device Manager + # BOTTOM + # v to move selection + ${construction}= Parse Menu Snapshot Into Construction ${menu} 1 3 + + # 50 is random number itassumes that you need lest than 50 arrow down + # clicks to go through entire menu + FOR ${key_down_qtty} IN RANGE 1 50 + Press Key N Times 1 ${ARROW_DOWN} + ${out}= Read From Terminal Until LCtrl+LAlt+F12=Save + ${contains}= Run Keyword And Ignore Error + ... Should Contain ${out} ${option} + IF '${contains}[0]' == 'PASS' RETURN ${key_down_qtty} + END + + Fail msg=Option '${option}' not found in menu. + Enter Boot Menu Tianocore And Return Construction [Documentation] ... Enters and returns the construction of the boot menu diff --git a/platform-configs/include/protectli-common.robot b/platform-configs/include/protectli-common.robot index 20e2167e5f..d9f7197659 100644 --- a/platform-configs/include/protectli-common.robot +++ b/platform-configs/include/protectli-common.robot @@ -81,6 +81,7 @@ ${DCU_SUPPORTED_BOOLEAN_SMMSTORE_VARIABLE}= UsbMassStorage ${HDMI_AUDIO_SUPPORT}= ${TRUE} ${SUSPEND_AND_RESUME_SUPPORT}= ${TRUE} ${HAS_SUPERIO_SERIAL}= ${TRUE} +${SATA_SUPPORT}= ${TRUE} # Test module: dasharo-security ${TPM_SUPPORTED_VERSION}= 2