Skip to content

dasharo-stability/capsule-update.robot: make compatible with protectli #922

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 5 additions & 12 deletions dasharo-stability/capsule-update.robot
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@ Suite Teardown Run Keywords
... Log Out And Close Connection


*** Variables ***
${FUM_DIALOG_TOP}= Update Mode. All firmware write protections are disabled in this mode.
${FUM_DIALOG_BOTTOM}= The platform will automatically reboot and disable Firmware Update Mode


*** Test Cases ***
CUP001.001 Capsule Update With Wrong Keys
[Documentation] Check that DUT rejects flashing a capsule signed with invalid certificate.
Expand Down Expand Up @@ -131,6 +126,7 @@ CUP170.001 Verifying UUID (Ubuntu)
CUP170.002 Verifying UUID (Windows)
[Documentation] Check if UUID didn't change after Capsule Update.
Skip If not ${TESTS_IN_WINDOWS_SUPPORT} CUP170.002 not supported

${tmp}= Get Variable Value $WIN_UPDATED_UUID
IF '${tmp}' == 'None'
Go To Windows Prompt
Expand All @@ -140,7 +136,10 @@ CUP170.002 Verifying UUID (Windows)
Log To Console \n[Before Update] ${ORIGINAL_UUID}
Log To Console \n[After Update] ${WIN_UPDATED_UUID}

Should Be Equal ${ORIGINAL_UUID} ${WIN_UPDATED_UUID}
Should Be True
... '${WIN_UPDATED_UUID}' == '${ORIGINAL_UUID}' or '${WIN_UPDATED_UUID}' == '00000000-0000-0000-0000-000000000000'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will succeed if Windows failed to read UUID while Ubuntu didn't, I meant something like this:

# dmidecode reports `Not Settable` for all zeroes
IF    '${ORIGINAL_UUID}' == 'Not Settable'
    Should Be Equal    ${ORIGINAL_UUID}    00000000-0000-0000-0000-000000000000
ELSE
    Should Be Equal    ${ORIGINAL_UUID}    ${WIN_UPDATED_UUID}
END

... UUID check passed

IF ${ROMHOLE_SUPPORT} == ${TRUE}
Should Be Equal ${WIN_UPDATED_UUID} 00112233-4455-6677-8899-aabbccddeeff
END
Expand Down Expand Up @@ -330,12 +329,6 @@ Perform Capsule Update
Write Bare Into Terminal reset
Press Key N Times 1 ${ENTER}

# Confirm update by following instructions of Firmware Update Mode dialog
Read From Terminal Until ${FUM_DIALOG_TOP}
${out}= Read From Terminal Until ${FUM_DIALOG_BOTTOM}
${digit}= Get Key To Press ${out}
Write Bare Into Terminal ${digit}

Get File Name Without Extension
[Arguments] ${file_path}
${path_components}= Split String ${file_path} /
Expand Down
2 changes: 2 additions & 0 deletions platform-configs/include/protectli-vp66xx.robot
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ ${CUSTOM_FAN_CURVE_OFF_MODE_SUPPORT}= ${TRUE}
# measuring temperatures, fans etc.
${SENSORS_CONFIG_FILE}= include/sensors/protectli-vp66xx-sensors-config.yaml
${CUSTOM_FAN_CURVE_FILE}= include/sensors/protectli-vp66xx-fan-curve-config.yaml

${CAPSULE_UPDATE_SUPPORT}= ${True}