Cleanup BMC dumps prior to BMC and PNOR code update.
Added:
- Fix FFDC lib path.
- Add BMC dump delete for BMC and host update.
Resolves openbmc/openbmc-test-automation#922
Change-Id: Ic5bc5c77f571ec39654aab039fb43d21b2967042
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/bmc_code_update.robot b/extended/code_update/bmc_code_update.robot
index 41751a6..76f2ef2 100644
--- a/extended/code_update/bmc_code_update.robot
+++ b/extended/code_update/bmc_code_update.robot
@@ -9,7 +9,8 @@
Resource ../../lib/boot_utils.robot
Resource code_update_utils.robot
Resource ../../lib/code_update_utils.robot
-Resource ../lib/openbmc_ffdc.robot
+Resource ../../lib/openbmc_ffdc.robot
+Resource ../../lib/dump_utils.robot
Test Teardown FFDC On Test Case Fail
@@ -24,6 +25,7 @@
REST BMC Code Update
[Documentation] Do a BMC code update by uploading image on BMC via REST.
[Tags] REST_BMC_Code_Update
+ [Setup] Code Update Setup
Upload And Activate Image ${IMAGE_FILE_PATH}
OBMC Reboot (off)
@@ -53,4 +55,10 @@
Upload And Activate Multiple BMC Images Setup
[Documentation] Check that the ALTERNATE_FILE_PATH variable is set.
- Should Not Be Empty ${ALTERNATE_IMAGE_FILE_PATH}
\ No newline at end of file
+ Should Not Be Empty ${ALTERNATE_IMAGE_FILE_PATH}
+
+Code Update Setup
+ [Documentation] Do code update test case setup.
+ # - Clean up all existing BMC dumps.
+
+ Delete All Dumps
diff --git a/extended/code_update/host_code_update.robot b/extended/code_update/host_code_update.robot
index 12fe770..3e388ec 100644
--- a/extended/code_update/host_code_update.robot
+++ b/extended/code_update/host_code_update.robot
@@ -20,8 +20,9 @@
Resource ../../lib/boot_utils.robot
Resource code_update_utils.robot
Resource ../../lib/code_update_utils.robot
-Resource ../lib/openbmc_ffdc.robot
+Resource ../../lib/openbmc_ffdc.robot
Resource ../../lib/state_manager.robot
+Resource ../../lib/dump_utils.robot
Test Teardown FFDC On Test Case Fail
@@ -142,7 +143,10 @@
Code Update Setup
[Documentation] Do code update test case setup.
+ # - Clean up all existing BMC dumps.
+ # - Clean up all currently install PNOR images.
+ Delete All Dumps
Run Keyword If 'true' == '${DELETE_OLD_PNOR_IMAGES}'
... Delete All PNOR Images