User pre-defined MDT profile execution
Resolves openbmc/openbmc-test-automation#612
Change-Id: I9a03e221d14d48775a346badc02a2a46d9bfddba
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/systest/htx_hardbootme_test.robot b/systest/htx_hardbootme_test.robot
index bc2363e..20d0f09 100644
--- a/systest/htx_hardbootme_test.robot
+++ b/systest/htx_hardbootme_test.robot
@@ -18,9 +18,14 @@
# Default hardbootme loop times HTX exerciser to run.
${HTX_LOOP} 4
-# User defined halt on error.
+# User-defined halt on error.
${HTX_KEEP_RUNNING} ${0}
+# User-defined MDT profile.
+# There are a few stanzas in the HTX test exerciser that need to be removed
+# temporarily and manually built and executed.
+${HTX_MDT_PROFILE} mdt.bu
+
*** Test Cases ***
Hard Bootme Test
@@ -50,15 +55,10 @@
# Post Power off and on, the OS SSH session needs to be established.
Login To OS
- Rprint Timen Create HTX mdt profile.
- ${profile}= Execute Command On OS htxcmdline -createmdt
- Rprint Timen ${profile}
- Should Contain ${profile} mdts are created successfully
+ Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu'
+ ... Create Default MDT Profile
- Rprint Timen Start HTX mdt profile execution.
- ${htx_run}= Execute Command On OS htxcmdline -run -mdt mdt.bu
- Rprint Timen ${htx_run}
- Should Contain ${htx_run} Activated
+ Run MDT Profile
Loop HTX Health Check
@@ -68,6 +68,7 @@
Rprint Timen HTX Test ran for: ${HTX_DURATION}
+
Loop HTX Health Check
[Documentation] Run until HTX exerciser fails.
@@ -80,7 +81,8 @@
[Documentation] Get HTX exerciser status and check for error.
Rprint Timen Check HTX mdt Status and error.
- ${status}= Execute Command On OS htxcmdline -status -mdt mdt.bu
+ ${status}= Execute Command On OS
+ ... htxcmdline -status -mdt ${HTX_MDT_PROFILE}
Log ${status}
Rprint Timen ${status}
@@ -91,11 +93,32 @@
Should Contain ${errlog} file </tmp/htxerr> is empty
+Create Default MDT Profile
+ [Documentation] Create default mdt.bu profile and run.
+
+ Rprint Timen Create HTX mdt profile.
+
+ ${profile}= Execute Command On OS htxcmdline -createmdt
+ Rprint Timen ${profile}
+ Should Contain ${profile} mdts are created successfully
+
+
+Run MDT Profile
+ [Documentation] Load user pre-defined MDT profile.
+
+ Rprint Timen Start HTX mdt profile execution.
+ ${htx_run}= Execute Command On OS
+ ... htxcmdline -run -mdt ${HTX_MDT_PROFILE}
+ Rprint Timen ${htx_run}
+ Should Contain ${htx_run} Activated
+
+
Shutdown HTX Exerciser
[Documentation] Shut down HTX exerciser run.
Rprint Timen Shutdown HTX Run
- ${shutdown}= Execute Command On OS htxcmdline -shutdown -mdt mdt.bu
+ ${shutdown}= Execute Command On OS
+ ... htxcmdline -shutdown -mdt ${HTX_MDT_PROFILE}
Rprint Timen ${shutdown}
Should Contain ${shutdown} shutdown successfully
@@ -126,4 +149,3 @@
FFDC On Test Case Fail
Close All Connections
-