diff --git a/dasharo-performance/custom-fan-curve.robot b/dasharo-performance/custom-fan-curve.robot index 7b67a7de..547ea4b7 100644 --- a/dasharo-performance/custom-fan-curve.robot +++ b/dasharo-performance/custom-fan-curve.robot @@ -40,7 +40,7 @@ CFC001.001 Custom fan curve silent profile measure (Ubuntu) Set UEFI Option FanCurveOption Silent Power On - Boot System Or From Connected Disk ubuntu + Boot System Or From Connected Disk ${ENV_ID_UBUNTU} Login To Linux Switch To Root User Perform Custom Fan Curve Test silent @@ -54,7 +54,7 @@ CFC002.001 Custom fan curve performance profile measure (Ubuntu) Set UEFI Option FanCurveOption Performance Power On - Boot System Or From Connected Disk ubuntu + Boot System Or From Connected Disk ${ENV_ID_UBUNTU} Login To Linux Switch To Root User Perform Custom Fan Curve Test performance @@ -68,7 +68,7 @@ CFC003.001 Custom fan curve OFF profile measure (Ubuntu) Set UEFI Option FanCurveOption Fans Off Power On - Boot System Or From Connected Disk ubuntu + Boot System Or From Connected Disk ${ENV_ID_UBUNTU} Login To Linux Switch To Root User Perform Custom Fan Curve Test off diff --git a/keywords.robot b/keywords.robot index 31df9b43..1bc3e866 100644 --- a/keywords.robot +++ b/keywords.robot @@ -83,7 +83,7 @@ Login To Windows Set Test Variable ${DUT_CONNECTION_METHOD} SSH END IF '${DUT_CONNECTION_METHOD}' == 'SSH' - Login To Windows Via SSH ${DEVICE_WINDOWS_USERNAME} ${DEVICE_WINDOWS_PASSWORD} + Login To Windows Via SSH ${DEVICE_OS_USERNAME} ${DEVICE_OS_PASSWORD} ELSE Fail Login to Windows not supported. DUT_CONNECTION_METHOD must be set to SSH. END @@ -156,8 +156,8 @@ Login To Windows Via SSH ... username and password respectively. The optional timeout ... parameter can be used to specify how long we want to ... wait for the login prompt. - [Arguments] ${username}=${DEVICE_WINDOWS_USERNAME} ${password}=${DEVICE_WINDOWS_PASSWORD} ${timeout}=180 - SSHLibrary.Open Connection ${DEVICE_IP} prompt=${DEVICE_WINDOWS_USER_PROMPT} + [Arguments] ${username}=${DEVICE_OS_USERNAME} ${password}=${DEVICE_OS_PASSWORD} ${timeout}=180 + SSHLibrary.Open Connection ${DEVICE_IP} prompt=${DEVICE_OS_USER_PROMPT} SSHLibrary.Set Client Configuration ... timeout=${timeout} ... term_type=vt100 @@ -524,8 +524,8 @@ Prepare To SSH Connection ... the SSH protocol # tu leci zmiana, musimy brać platformy zgodnie z tym co zostało pobrane w dasharo Set Global Variable ${PLATFORM} ${CONFIG} - IF '${DEFAULT_BOOT_OS}' - Import Variables ${CURDIR}/os-config/${DEFAULT_BOOT_OS}-credentials.py + IF '${DEFAULT_BOOT_OS_ID}' + Import Variables ${CURDIR}/os-config/${DEFAULT_BOOT_OS_ID}-credentials.py END SSHLibrary.Set Default Configuration timeout=60 seconds IF '${SNIPEIT}'=='no' RETURN diff --git a/lib/bios/menus.robot b/lib/bios/menus.robot index dfe0ac00..fcd92877 100644 --- a/lib/bios/menus.robot +++ b/lib/bios/menus.robot @@ -1160,8 +1160,8 @@ Boot System Or From Connected Disk # robocop: disable=too-long-keyword [Arguments] ${env_id} ${boot_menu}=NOT_SET ${system_name}= Get From Dictionary ${ENV_ID_OS_BOOTMENU_NAMES} ${env_id} - Set Suite Variable ${BOOTED_OS} ${system_name} - Import Variables ${CURDIR}/../../os-config/${system_name}-credentials.py + Set Suite Variable ${BOOTED_OS_ID} ${env_id} + Import Variables ${CURDIR}/../../os-config/${env_id}-credentials.py IF '${DUT_CONNECTION_METHOD}' == 'SSH' RETURN diff --git a/lib/options/options-lib_dcu.robot b/lib/options/options-lib_dcu.robot index aa93e06a..a44becf9 100644 --- a/lib/options/options-lib_dcu.robot +++ b/lib/options/options-lib_dcu.robot @@ -138,18 +138,16 @@ Login To Windows Boot System Or From Connected Disk [Documentation] Keyword makes the DUT to reboot in chosen OS. There is a requirement for DUT to always reboot to Ubuntu. [Arguments] ${env_id} - ${system_name}= Get From Dictionary ${ENV_ID_OS_BOOTMENU_NAMES} ${env_id} ${os_boot_id}= Set Variable ${EMPTY} - ${system_name}= Get From Dictionary ${ENV_ID_OS_BOOTMENU_NAMES} ${env_id} - ${os}= Convert To Lower Case ${system_name} + ${os_bootentry_name}= Get From Dictionary ${ENV_ID_OS_BOOTMENU_NAMES} ${env_id} - Import Variables ${CURDIR}/../../os-config/${BOOTED_OS}-credentials.py + Import Variables ${CURDIR}/../../os-config/${BOOTED_OS_ID}-credentials.py Login To Linux Switch To Root User - IF '${BOOTED_OS}' == '${os}' + IF '${BOOTED_OS_ID}' == '${env_id}' Log Target OS already booted RETURN END @@ -164,7 +162,7 @@ Boot System Or From Connected Disk ${line}= Get Substring ${line} 0 150 ${line}= Convert To Lower Case ${line} - IF '${os}' in '${line}' + IF '${os_bootentry_name}' in '${line}' ${os_boot_id}= Set Variable ${line} BREAK END @@ -174,8 +172,8 @@ Boot System Or From Connected Disk Execute Command In Terminal efibootmgr --bootnext ${id} Sleep 1s Write Into Terminal reboot - Import Variables ${CURDIR}/../../os-config/${os}-credentials.py - Set Suite Variable ${BOOTED_OS} ${os} + Import Variables ${CURDIR}/../../os-config/${env_id}-credentials.py + Set Suite Variable ${BOOTED_OS_ID} ${env_id} Sleep 30s ELSE Fail Os entry not found @@ -184,8 +182,8 @@ Boot System Or From Connected Disk Login To Windows Via SSH [Documentation] Login to Windows via SSH by using provided arguments as ... username and password respectively. - [Arguments] ${username}=${DEVICE_WINDOWS_USERNAME} ${password}=${DEVICE_WINDOWS_PASSWORD} ${timeout}=180 - SSHLibrary.Open Connection ${DEVICE_IP} prompt=${DEVICE_WINDOWS_USER_PROMPT} + [Arguments] ${username}=${DEVICE_OS_USERNAME} ${password}=${DEVICE_OS_PASSWORD} ${timeout}=180 + SSHLibrary.Open Connection ${DEVICE_IP} prompt=${DEVICE_OS_USER_PROMPT} SSHLibrary.Set Client Configuration ... timeout=${timeout} ... term_type=vt100 diff --git a/os-config/ubuntu-credentials.py b/os-config/201-credentials.py similarity index 100% rename from os-config/ubuntu-credentials.py rename to os-config/201-credentials.py diff --git a/os-config/fedora-credentials.py b/os-config/202-credentials.py similarity index 100% rename from os-config/fedora-credentials.py rename to os-config/202-credentials.py diff --git a/os-config/301-credentials.py b/os-config/301-credentials.py new file mode 100644 index 00000000..7381e0ea --- /dev/null +++ b/os-config/301-credentials.py @@ -0,0 +1,9 @@ +# SPDX-FileCopyrightText: 2025 3mdeb +# +# SPDX-License-Identifier: Apache-2.0 + +DEVICE_OS_USERNAME = "user" +DEVICE_OS_PASSWORD = "windows" + +DEVICE_OS_USER_PROMPT = f"PS C:\\Users\\{DEVICE_OS_USERNAME}>" +DEVICE_OS_ROOT_PROMPT = f"PS C:\\Users\\{DEVICE_OS_USERNAME}>" diff --git a/os-config/environment-test-ids.py b/os-config/environment-test-ids.py index 34512786..9e71a834 100644 --- a/os-config/environment-test-ids.py +++ b/os-config/environment-test-ids.py @@ -20,6 +20,6 @@ ENV_ID_WINDOWS_11 = "301" ENV_ID_OS_BOOTMENU_NAMES = { ENV_ID_UBUNTU: "ubuntu", ENV_ID_FEDORA: "fedora", - ENV_ID_WINDOWS_11: "windows", + ENV_ID_WINDOWS_11: "Windows Boot", ENV_ID_TRENCHBOOT: "trenchboot", } diff --git a/os-config/windows-credentials.py b/os-config/windows-credentials.py deleted file mode 100644 index b209658e..00000000 --- a/os-config/windows-credentials.py +++ /dev/null @@ -1,9 +0,0 @@ -# SPDX-FileCopyrightText: 2025 3mdeb -# -# SPDX-License-Identifier: Apache-2.0 - -OS_USERNAME = "user" -OS_PASSWORD = "windows" - -OS_USER_PROMPT = f"PS C:\\Users\\{OS_USERNAME}>" -OS_ROOT_PROMPT = f"PS C:\\Users\\{OS_USERNAME}>" diff --git a/platform-configs/include/default.robot b/platform-configs/include/default.robot index 62157639..dc1b85f0 100644 --- a/platform-configs/include/default.robot +++ b/platform-configs/include/default.robot @@ -275,8 +275,8 @@ ${DCU_SUPPORTED_BOOLEAN_SMMSTORE_VARIABLE}= NetworkBoot ${ETH_PORTS}= ${EMPTY} ${TESTED_LINUX_DISTROS}= ${ENV_ID_UBUNTU} -${DEFAULT_BOOT_OS}= ubuntu -${BOOTED_OS}= ${DEFAULT_BOOT_OS} +${DEFAULT_BOOT_OS_ID}= ${ENV_ID_UBUNTU} +${BOOTED_OS_ID}= ${DEFAULT_BOOT_OS_ID} *** Keywords *** diff --git a/self-tests/dcu.robot b/self-tests/dcu.robot index 6676ed31..1c5e3710 100644 --- a/self-tests/dcu.robot +++ b/self-tests/dcu.robot @@ -30,7 +30,7 @@ Boot System Or From Connected Disk Power On Dcu.Boot System Or From Connected Disk ${ENV_ID_WINDOWS_11} - Dcu.Login To Windows Via SSH ${DEVICE_WINDOWS_USERNAME} ${DEVICE_WINDOWS_PASSWORD} + Dcu.Login To Windows Via SSH ${DEVICE_OS_USERNAME} ${DEVICE_OS_PASSWORD} Power On Dcu.Boot System Or From Connected Disk ${OS_UBUNTU} diff --git a/trenchboot/01-without-drtm.robot b/trenchboot/01-without-drtm.robot index 37dca3c8..450dd080 100644 --- a/trenchboot/01-without-drtm.robot +++ b/trenchboot/01-without-drtm.robot @@ -62,7 +62,7 @@ TrenchBoot Suite Setup Skip If not ${TESTS_IN_METATB_SUPPORT} Tests in meta-trenchboot aren't supported Power On - Boot System Or From Connected Disk trenchboot + Boot System Or From Connected Disk ${ENV_ID_TRENCHBOOT} Read From Terminal Until Press enter to boot the selected OS Write Bare Into Terminal ${ENTER} diff --git a/trenchboot/02-with-drtm.robot b/trenchboot/02-with-drtm.robot index 7655b95a..2dda9a13 100644 --- a/trenchboot/02-with-drtm.robot +++ b/trenchboot/02-with-drtm.robot @@ -164,7 +164,7 @@ TrenchBoot Suite Setup Skip If not ${TESTS_IN_METATB_SUPPORT} Tests in meta-trenchboot aren't supported Power On - Boot System Or From Connected Disk trenchboot + Boot System Or From Connected Disk ${ENV_ID_TRENCHBOOT} Read From Terminal Until Press enter to boot the selected OS # Slaunch is the second boot option, pick it. Write Bare Into Terminal ${ARROW_DOWN}