Fix all test suite setup for booting host
We ran into situation where the previous tests powered on but didn't
boot the host succesfully. To protect this test execution from such
bad state, issue reboot host to re-power on clean.
Resolves openbmc/openbmc-test-automation#773
Change-Id: I3ae6c6ec3f186d89f856d00813f66efd9c8b51f9
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_sensors.robot b/tests/test_sensors.robot
index 2ffc7ea..5bf1027 100644
--- a/tests/test_sensors.robot
+++ b/tests/test_sensors.robot
@@ -379,9 +379,12 @@
Setup The Suite
[Documentation] Do the initial suite setup.
+
+ # Reboot host to re-power on clean if host is not "off".
${current_state}= Get Host State
Run Keyword If '${current_state}' == 'Off'
... Initiate Host Boot
+ ... ELSE Initiate Host Reboot
Wait Until Keyword Succeeds
... 10 min 10 sec Is OS Starting