Host needs to be booted for boot settings / policies test

Resolves openbmc/openbmc-test-automation#465

Change-Id: I0c2ca15b101f3a688fd619f8cb12c54b8d89f693
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_boot_devices.robot b/tests/test_boot_devices.robot
index 5459dc0..23afd1f 100644
--- a/tests/test_boot_devices.robot
+++ b/tests/test_boot_devices.robot
@@ -7,9 +7,10 @@
 Resource        ../lib/openbmc_ffdc.robot
 Resource        ../lib/utils.robot
 
+Suite Setup     Test Suite Setup
 Test Setup      Pre Test Case Execution
 Test Teardown   Post Test Case Execution
-
+Suite Teardown  Close All Connections
 
 *** Variables ***
 
@@ -201,3 +202,12 @@
 
    FFDC On Test Case Fail
    Close All Connections
+
+Test Suite Setup
+    [Documentation]  Do the initial suite setup.
+    ${current_state}=  Get Host State
+    Run Keyword If  '${current_state}' == 'Off'
+    ...  Initiate Host Boot
+
+    Wait Until Keyword Succeeds
+    ...  10 min  10 sec  Is OS Starting
diff --git a/tests/test_boot_policies.robot b/tests/test_boot_policies.robot
index 9a5d3d7..3ed6a6c 100644
--- a/tests/test_boot_policies.robot
+++ b/tests/test_boot_policies.robot
@@ -8,8 +8,8 @@
 Resource           ../lib/openbmc_ffdc.robot
 Resource           ../lib/state_manager.robot
 
-Suite Setup        Open Connection And Log In
-Test Setup         Initialize DBUS cmd   "boot_policy"
+Suite Setup        Test Suite Setup
+Test Setup         Test Init Setup
 Test Teardown      FFDC On Test Case Fail
 Suite Teardown     Restore Boot Settings
 
@@ -154,3 +154,18 @@
     Set Boot Policy  ONETIME
     Set Boot Device  default
     Close All Connections
+
+Test Init Setup
+    [Documentation]  Do the initial test setup.
+    Open Connection And Log In
+    Initialize DBUS cmd  "boot_flags"
+
+Test Suite Setup
+    [Documentation]  Do the initial suite setup.
+    ${current_state}=  Get Host State
+    Run Keyword If  '${current_state}' == 'Off'
+    ...  Initiate Host Boot
+
+    Wait Until Keyword Succeeds
+    ...  10 min  10 sec  Is OS Starting
+