Fix bug in recoverable code update tests
When running recoverable code update tests, Robot will use a dummy
image to update to. This fix makes sure that the dummy image
is deleted in between each test case.
Resoves openbmc/openbmc-test-automation#1068
Change-Id: If94618cb3a926bfba1f41fb1f39b551014a73f0f
Signed-off-by: Charles Paul Hofer <Charles.Hofer@ibm.com>
diff --git a/extended/code_update/bmc_recoverable_error_test.robot b/extended/code_update/bmc_recoverable_error_test.robot
index 9632c3b..85f2416 100644
--- a/extended/code_update/bmc_recoverable_error_test.robot
+++ b/extended/code_update/bmc_recoverable_error_test.robot
@@ -62,3 +62,4 @@
Upload And Activate Image ${IMAGE_FILE_PATH} skip_if_active=true
OBMC Reboot (off)
+ Delete All Non Running BMC Images
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index 34b4054..886edaa 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -180,7 +180,12 @@
${activation}= Set Variable &{software_state}[Activation]
Run Keyword If
... '${skip_if_active}' == 'true' and '${activation}' == '${ACTIVE}'
- ... Switch To Active Image And Pass ${SOFTWARE_VERSION_URI}${version_id}
+ ... Run Keywords
+ ... Set Host Software Property ${SOFTWARE_VERSION_URI}${version_id}
+ ... Priority ${0}
+ ... AND
+ ... Return From Keyword
+
Should Be Equal As Strings &{software_state}[Activation] ${READY}
# Request the image to be activated.
@@ -223,20 +228,6 @@
Should Be Equal As Strings ${resp.status_code} ${HTTP_NOT_FOUND}
-Switch To Active Image And Pass
- [Documentation] Make the given active image the image running on the BMC
- ... and pass the test.
- [Arguments] ${software_object}
-
- # Description of argument(s):
- # software_object Software object path.
- # (e.g. "/xyz/openbmc_project/software/f3b29aa8").
-
- Set Host Software Property ${software_object} Priority ${0}
- OBMC Reboot (off)
- Pass Execution ${software_object} was already on the BMC.
-
-
Activate Image And Verify No Duplicate Priorities
[Documentation] Upload an image, and then check that no images have the
... same priority.