19f74d3afSCharles Paul Hofer*** Settings *** 29f74d3afSCharles Paul HoferDocumentation Update the BMC code on a target BMC. 39f74d3afSCharles Paul Hofer... Execution Method: 49f74d3afSCharles Paul Hofer... python -m robot -v OPENBMC_HOST:<hostname> 59f74d3afSCharles Paul Hofer... -v IMAGE_FILE_PATH:<path/*.tar> bmc_code_update.robot 69f74d3afSCharles Paul Hofer 79f74d3afSCharles Paul HoferLibrary ../../lib/code_update_utils.py 89f74d3afSCharles Paul HoferVariables ../../data/variables.py 99f74d3afSCharles Paul HoferResource ../../lib/boot_utils.robot 109f74d3afSCharles Paul HoferResource code_update_utils.robot 119f74d3afSCharles Paul HoferResource ../../lib/code_update_utils.robot 121eb85f57SGeorge KeishingResource ../../lib/openbmc_ffdc.robot 131eb85f57SGeorge KeishingResource ../../lib/dump_utils.robot 149f74d3afSCharles Paul Hofer 150071549eSGeorge KeishingTest Teardown Code Update Test Teardown 169f74d3afSCharles Paul Hofer 179f74d3afSCharles Paul Hofer*** Variables *** 189f74d3afSCharles Paul Hofer 199f74d3afSCharles Paul Hofer${QUIET} ${1} 209f74d3afSCharles Paul Hofer${IMAGE_FILE_PATH} ${EMPTY} 21c1fa2bc9SCharles Paul Hofer${ALTERNATE_IMAGE_FILE_PATH} ${EMPTY} 229f74d3afSCharles Paul Hofer 239f74d3afSCharles Paul Hofer*** Test Cases *** 249f74d3afSCharles Paul Hofer 259f74d3afSCharles Paul HoferREST BMC Code Update 269f74d3afSCharles Paul Hofer [Documentation] Do a BMC code update by uploading image on BMC via REST. 279f74d3afSCharles Paul Hofer [Tags] REST_BMC_Code_Update 281eb85f57SGeorge Keishing [Setup] Code Update Setup 299f74d3afSCharles Paul Hofer 309f74d3afSCharles Paul Hofer Upload And Activate Image ${IMAGE_FILE_PATH} 319f74d3afSCharles Paul Hofer OBMC Reboot (off) 329f74d3afSCharles Paul Hofer 339f74d3afSCharles Paul Hofer 34c1fa2bc9SCharles Paul HoferUpload And Activate Multiple BMC Images 35c1fa2bc9SCharles Paul Hofer [Documentation] Upload another BMC image and verify that its state is 36c1fa2bc9SCharles Paul Hofer ... different from all others. 37c1fa2bc9SCharles Paul Hofer [Tags] Upload_And_Activate_Multiple_BMC_Images 38c1fa2bc9SCharles Paul Hofer [Template] Activate Image And Verify No Duplicate Priorities 39c1fa2bc9SCharles Paul Hofer [Setup] Upload And Activate Multiple BMC Images Setup 40c1fa2bc9SCharles Paul Hofer 41c1fa2bc9SCharles Paul Hofer # Image File Path Image Purpose 42c1fa2bc9SCharles Paul Hofer ${ALTERNATE_IMAGE_FILE_PATH} ${VERSION_PURPOSE_BMC} 43c1fa2bc9SCharles Paul Hofer 44c1fa2bc9SCharles Paul Hofer 45*42f17468SCharles Paul HoferBMC Set Priority To Invalid Values 46*42f17468SCharles Paul Hofer [Documentation] Attempt to set the priority of an image to an invalid 47*42f17468SCharles Paul Hofer ... value and expect an error. 48*42f17468SCharles Paul Hofer [Tags] BMC_Set_Priority_To_Invalid_Values 49*42f17468SCharles Paul Hofer [Template] Set Priority To Invalid Value And Expect Error 50*42f17468SCharles Paul Hofer 51*42f17468SCharles Paul Hofer # Version Type Priority 52*42f17468SCharles Paul Hofer ${VERSION_PURPOSE_BMC} ${-1} 53*42f17468SCharles Paul Hofer ${VERSION_PURPOSE_BMC} ${256} 54*42f17468SCharles Paul Hofer 55*42f17468SCharles Paul Hofer 569f74d3afSCharles Paul HoferDelete BMC Image 579f74d3afSCharles Paul Hofer [Documentation] Delete a BMC image from the BMC flash chip. 589f74d3afSCharles Paul Hofer [Tags] Delete_BMC_Image 599f74d3afSCharles Paul Hofer 609f74d3afSCharles Paul Hofer ${software_object}= Get Non Running BMC Software Object 619f74d3afSCharles Paul Hofer Delete Image And Verify ${software_object} ${VERSION_PURPOSE_BMC} 62c1fa2bc9SCharles Paul Hofer 63c1fa2bc9SCharles Paul Hofer 64c1fa2bc9SCharles Paul Hofer*** Keywords *** 65c1fa2bc9SCharles Paul Hofer 66c1fa2bc9SCharles Paul HoferUpload And Activate Multiple BMC Images Setup 67c1fa2bc9SCharles Paul Hofer [Documentation] Check that the ALTERNATE_FILE_PATH variable is set. 68c1fa2bc9SCharles Paul Hofer 69c1fa2bc9SCharles Paul Hofer Should Not Be Empty ${ALTERNATE_IMAGE_FILE_PATH} 701eb85f57SGeorge Keishing 711eb85f57SGeorge KeishingCode Update Setup 721eb85f57SGeorge Keishing [Documentation] Do code update test case setup. 731eb85f57SGeorge Keishing # - Clean up all existing BMC dumps. 741eb85f57SGeorge Keishing 751eb85f57SGeorge Keishing Delete All Dumps 760071549eSGeorge Keishing 770071549eSGeorge KeishingCode Update Test Teardown 780071549eSGeorge Keishing [Documentation] Do code update test case teardown. 790071549eSGeorge Keishing # 1. Collect FFDC if test case failed. 800071549eSGeorge Keishing # 2. Collect FFDC if test PASS but error log exists. 810071549eSGeorge Keishing 820071549eSGeorge Keishing FFDC On Test Case Fail 830071549eSGeorge Keishing Run Keyword If '${TEST_STATUS}' == 'PASS' Check Error And Collect FFDC 84