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_boot_devices.robot b/tests/test_boot_devices.robot
index 94e00e3..3a4e984 100644
--- a/tests/test_boot_devices.robot
+++ b/tests/test_boot_devices.robot
@@ -193,9 +193,12 @@
Test Suite Setup
[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