Disable field mode keyword
To give user a way to disable the field mode on demand.
A test_xit.robot is added to ensure when fully loaded CT
is run, this test code is executed at the end. The reason
being they are executed sequentially and _xit is the last
in the order. This is not a very good way to do it but until
we find a better solution, this is pretty much needed.
Change-Id: I351fa513fc6287c966266c46132b9e2ac08a8857
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/code_update/test_field_mode.robot b/extended/code_update/test_field_mode.robot
index 044b124..91b5cd9 100644
--- a/extended/code_update/test_field_mode.robot
+++ b/extended/code_update/test_field_mode.robot
@@ -68,7 +68,4 @@
# 1. Disable field mode
# 2. Check that /usr/local is mounted
- BMC Execute Command /sbin/fw_setenv fieldmode
- BMC Execute Command /bin/systemctl unmask usr-local.mount
- OBMC Reboot (off) quiet=${1}
- BMC Execute Command [ -d "/usr/local/share" ]
+ Disable Field Mode And Verify Unmount
diff --git a/lib/code_update_utils.robot b/lib/code_update_utils.robot
index 778ec02..55dc734 100644
--- a/lib/code_update_utils.robot
+++ b/lib/code_update_utils.robot
@@ -412,3 +412,12 @@
Sleep 5s
BMC Execute Command [ ! -d "/usr/local/share" ]
+
+Disable Field Mode And Verify Unmount
+ [Documentation] Disable field mode, unmask usr local mount and reboot.
+
+ BMC Execute Command /sbin/fw_setenv fieldmode
+ BMC Execute Command /bin/systemctl unmask usr-local.mount
+ OBMC Reboot (off) quiet=${1}
+ BMC Execute Command [ -d "/usr/local/share" ]
+
diff --git a/tests/test_xit.robot b/tests/test_xit.robot
new file mode 100644
index 0000000..735345a
--- /dev/null
+++ b/tests/test_xit.robot
@@ -0,0 +1,12 @@
+*** Settings ***
+Documentation This suite is for disable field mode if enabled.
+
+Resource ../lib/code_update_utils.robot
+
+
+*** Test Cases ***
+
+Verify Field Mode Is Disable
+ [Documentation] Disable software manager field mode.
+
+ Disable Field Mode And Verify Unmount