Joy Onyerikwu | 389b329 | 2018-05-08 15:59:51 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Update internal storage devices uCode for solid-state |
| 3 | ... drives (SSDs) and hard disk drives (HDDs). |
| 4 | |
| 5 | # TEST PARAMETERS: |
| 6 | # OPENBMC_HOST The BMC host name or IP address. |
| 7 | # OPENBMC_PASSWORD The BMC password. |
| 8 | # OPENBMC_USERNAME The BMC user name. |
| 9 | # OS_HOST The OS host name or IP address. |
| 10 | # OS_USERNAME The OS user name. |
| 11 | # OS_PASSWORD The OS password. |
| 12 | # SDA_UCODE_FILE_PATH The path of the ucode file, on the OS |
| 13 | # for the sda disk (e.g "Code_File.bin"). |
| 14 | # SDA_DESIRED_LEVEL The expected firmware level for sda |
| 15 | # after the firmware update (e.g "MJ06"). |
| 16 | # SDB_UCODE_FILE_PATH The path of the ucode file, on the OS |
| 17 | # for the sdb disk (e.g "Code_File.bin"). |
| 18 | # SDB_DESIRED_LEVEL The expected firmware level for sdb |
| 19 | # after the firmware update (e.g "MK06"). |
| 20 | |
| 21 | Resource ../syslib/utils_os.robot |
| 22 | Library ../lib/gen_robot_valid.py |
| 23 | Library ../lib/firmware_utils.py |
| 24 | |
| 25 | |
| 26 | Test Setup Test Setup Execution |
| 27 | Test Teardown FFDC On Test Case Fail |
| 28 | |
| 29 | |
| 30 | *** Variables *** |
| 31 | |
| 32 | |
| 33 | *** Test Cases *** |
| 34 | |
| 35 | Load Microcode On Hard Disks |
| 36 | [Documentation] Load the microcode onto the hard disks. |
| 37 | [Tags] Load_Microcode_On_Hard_Disks |
| 38 | |
| 39 | # Load firmware. |
| 40 | ${sda_update_cmd}= Catenate hdparm --yes-i-know-what-i-am-doing |
| 41 | ... --please-destroy-my-drive --fwdownload ${SDA_UCODE_FILE_PATH} |
| 42 | ... /dev/sda |
| 43 | ${sdb_update_cmd}= Catenate hdparm --yes-i-know-what-i-am-doing |
| 44 | ... --please-destroy-my-drive --fwdownload ${SDB_UCODE_FILE_PATH} |
| 45 | ... /dev/sdb |
| 46 | |
| 47 | OS Execute Command ${sda_update_cmd} |
| 48 | OS Execute Command ${sdb_update_cmd} |
| 49 | |
| 50 | |
| 51 | Reboot OS And Verify Code Update |
| 52 | [Documentation] Reboot the OS and verify that the firmware revision |
| 53 | ... now reflects the desired levels. |
| 54 | [Tags] Reboot_OS_And_Verify_Code_Update |
| 55 | |
| 56 | Host Reboot |
| 57 | &{sdb_info}= Get Hard Disk Info /dev/sdb |
| 58 | &{sda_info}= Get Hard Disk Info /dev/sda |
| 59 | Should Be Equal ${sdb_info['firmware_revision']} |
| 60 | ... ${SDB_DESIRED_LEVEL} msg=Update failed for SDB. |
| 61 | Should Be Equal ${sda_info['firmware_revision']} |
| 62 | ... ${SDA_DESIRED_LEVEL} msg=Update failed for SDA. |
| 63 | |
| 64 | |
| 65 | *** Keywords *** |
| 66 | Test Setup Execution |
| 67 | [Documentation] Do initial setup tasks. |
| 68 | |
| 69 | Rvalid Value SDB_DESIRED_LEVEL |
| 70 | Rvalid Value SDA_DESIRED_LEVEL |
| 71 | Rvalid Value SDB_UCODE_FILE_PATH |
| 72 | Rvalid Value SDA_UCODE_FILE_PATH |