Fixed Loop issue in htx_softbootme_test.robot
Changes:
- Added changes to fix CT issues for htx_softbootme_test.robot
Tested:
- Ran the test case from sandbox successfully
Change-Id: Iabf97b3054fd17cb0002bc5b9c1a86fe4f7209e7
Signed-off-by: sarandev3 <saranyad@in.ibm.com>
diff --git a/systest/htx_softbootme_test.robot b/systest/htx_softbootme_test.robot
index 8f93e7a..7a54465 100644
--- a/systest/htx_softbootme_test.robot
+++ b/systest/htx_softbootme_test.robot
@@ -33,7 +33,7 @@
[Tags] Soft_Bootme_Test
Printn
- Rprint Vars HTX_DURATION HTX_LOOP
+ Rprint Vars BOOTME_PERIOD HTX_LOOP
# Set up the (soft) bootme iteration (loop) counter.
Set Suite Variable ${iteration} ${0} children=true
@@ -54,14 +54,6 @@
# - Soft bootme (OS Reboot).
# - Check HTX status for errors.
- ${runtime}= Convert Time ${HTX_DURATION}
-
- ${startTime} = Get Current Date
- Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu'
- ... Create Default MDT Profile
-
- Run MDT Profile
-
# **********************************
# HTX bootme_period:
# 1 - every 20 minutes
@@ -69,6 +61,22 @@
# 3 - every hour
# 4 - every midnight
# **********************************
+
+ # Set a boot interval based on the given boot me period.
+
+ ${boot_interval}= Set Variable If
+ ... ${BOOTME_PERIOD} == 1 20m
+ ... ${BOOTME_PERIOD} == 2 30m
+ ... ${BOOTME_PERIOD} == 3 1h
+
+ ${runtime}= Convert Time ${boot_interval}
+
+ ${startTime} = Get Current Date
+ Run Keyword If '${HTX_MDT_PROFILE}' == 'mdt.bu'
+ ... Create Default MDT Profile
+
+ Run MDT Profile
+
Run Soft Bootme ${BOOTME_PERIOD}
FOR ${index} IN RANGE 999999