mirror of
https://github.com/Dasharo/open-source-firmware-validation.git
synced 2026-06-13 10:16:18 -07:00
capsule-update.robot: added file upload when ubuntu is not availible
Signed-off-by: Jan Prusinowski <jan.prusinowski@3mdeb.com>
This commit is contained in:
@@ -270,26 +270,47 @@ Upload Required Files
|
||||
${file_name}= Get File Name Without Extension ${CAPSULE_FW_FILE}
|
||||
|
||||
Set DUT Response Timeout 5m
|
||||
Go To Ubuntu Prompt
|
||||
|
||||
# Send File To DUT uses regular user, so prepare target directory in as root
|
||||
Execute Command In Terminal rm -r /capsule_testing
|
||||
Execute Command In Terminal mkdir /capsule_testing
|
||||
Execute Command In Terminal chmod 777 /capsule_testing
|
||||
IF ${TESTS_IN_UBUNTU_SUPPORT}
|
||||
Go To Ubuntu Prompt
|
||||
# Send File To DUT uses regular user, so prepare target directory in as root
|
||||
Execute Command In Terminal rm -r /capsule_testing
|
||||
Execute Command In Terminal mkdir /capsule_testing
|
||||
Execute Command In Terminal chmod 777 /capsule_testing
|
||||
|
||||
Log To Console Sending ./dasharo-stability/capsule-update-files/CapsuleApp.efi
|
||||
Send File To DUT ./dasharo-stability/capsule-update-files/CapsuleApp.efi /capsule_testing/CapsuleApp.efi
|
||||
Log To Console Sending ${CAPSULE_FW_FILE}
|
||||
Send File To DUT ${CAPSULE_FW_FILE} /capsule_testing/valid_capsule.cap
|
||||
Log To Console Sending ./dl-cache/edk2/${file_name}_wrong_cert.cap
|
||||
Send File To DUT ./dl-cache/edk2/${file_name}_wrong_cert.cap /capsule_testing/wrong_cert.cap
|
||||
Log To Console Sending ./dl-cache/edk2/${file_name}_invalid_guid.cap
|
||||
Send File To DUT ./dl-cache/edk2/${file_name}_invalid_guid.cap /capsule_testing/invalid_guid.cap
|
||||
Log To Console Sending ./dasharo-stability/capsule-update-files/CapsuleApp.efi
|
||||
Send File To DUT ./dasharo-stability/capsule-update-files/CapsuleApp.efi /capsule_testing/CapsuleApp.efi
|
||||
Log To Console Sending ${CAPSULE_FW_FILE}
|
||||
Send File To DUT ${CAPSULE_FW_FILE} /capsule_testing/valid_capsule.cap
|
||||
Log To Console Sending ./dl-cache/edk2/${file_name}_wrong_cert.cap
|
||||
Send File To DUT ./dl-cache/edk2/${file_name}_wrong_cert.cap /capsule_testing/wrong_cert.cap
|
||||
Log To Console Sending ./dl-cache/edk2/${file_name}_invalid_guid.cap
|
||||
Send File To DUT ./dl-cache/edk2/${file_name}_invalid_guid.cap /capsule_testing/invalid_guid.cap
|
||||
|
||||
# Move the directory to ESP partition so the tests work even if root
|
||||
# file-system is part of LVM
|
||||
Execute Command In Terminal rm -r /boot/efi/capsule_testing
|
||||
Execute Command In Terminal mv /capsule_testing /boot/efi
|
||||
# Move the directory to ESP partition so the tests work even if root
|
||||
# file-system is part of LVM
|
||||
Execute Command In Terminal rm -r /boot/efi/capsule_testing
|
||||
Execute Command In Terminal mv /capsule_testing /boot/efi
|
||||
ELSE IF ${TESTS_IN_WINDOWS_SUPPORT}
|
||||
Go To Windows Prompt
|
||||
Set Prompt C:\>
|
||||
Execute Command In Terminal cd \
|
||||
Execute Command In Terminal rmdir capsule_testing
|
||||
Execute Command In Terminal mkdir capsule_testing
|
||||
|
||||
Log To Console Sending ./dasharo-stability/capsule-update-files/CapsuleApp.efi
|
||||
SSHLibrary.Put File
|
||||
... ./dasharo-stability/capsule-update-files/CapsuleApp.efi
|
||||
... C:\\capsule_testing\\CapsuleApp.efi
|
||||
Log To Console Sending ${CAPSULE_FW_FILE}
|
||||
SSHLibrary.Put File ${CAPSULE_FW_FILE} C:\\capsule_testing\\valid_capsule.cap
|
||||
Log To Console Sending ./dl-cache/edk2/${file_name}_wrong_cert.cap
|
||||
SSHLibrary.Put File ./dl-cache/edk2/${file_name}_wrong_cert.cap C:\\capsule_testing\\wrong_cert.cap
|
||||
Log To Console Sending ./dl-cache/edk2/${file_name}_invalid_guid.cap
|
||||
SSHLibrary.Put File ./dl-cache/edk2/${file_name}_invalid_guid.cap C:\\capsule_testing\\invalid_guid.cap
|
||||
ELSE
|
||||
Fail No Ubuntu nor Windows support.
|
||||
END
|
||||
|
||||
# Make sure file-system data is pushed to disks before resetting a platform
|
||||
Execute Command In Terminal sync
|
||||
@@ -438,8 +459,6 @@ Get System Values
|
||||
IF ${TESTS_IN_UBUNTU_SUPPORT}
|
||||
Get Ubuntu System Values $ORIGINAL_SERIAL $ORIGINAL_UUID $ORIGINAL_LOGO_SHA256
|
||||
ELSE IF ${TESTS_IN_WINDOWS_SUPPORT}
|
||||
Power On
|
||||
Go To Windows Prompt
|
||||
Get Windows System Values $ORIGINAL_SERIAL $ORIGINAL_UUID
|
||||
ELSE
|
||||
Fail No Windows nor Ubuntu support available
|
||||
|
||||
Reference in New Issue
Block a user