Issue Power off prior to reboot for event and association tests

On a reset, BMC would boot to BMC_READY or HOST_POWERED_OFF
if BMC was OFF prior to boot and would boot to HOST_BOOTED
state if BMC was ON.

With this change, it would do a control state check to ensure the
BMC boots back to what the test is expecting.

Change-Id: I350da1d99c46ac586032e91d84c509e4dbb26f7f
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_eventlog.robot b/tests/test_eventlog.robot
index d2eadc4..5bb59f6 100644
--- a/tests/test_eventlog.robot
+++ b/tests/test_eventlog.robot
@@ -6,6 +6,7 @@
 Resource          ../lib/utils.robot
 Resource          ../lib/connection_client.robot
 Resource          ../lib/openbmc_ffdc.robot
+Resource          ../lib/boot/boot_resource_master.robot
 
 Library           Collections
 
@@ -153,6 +154,7 @@
     ...                 openbmc reboot
     ...                 Steps:
     ...                     Create event,
+    ...                     Power off if ON else no-op
     ...                     Reboot openbmc,
     ...                     Wait for BMC to READY or Powered OFF state
     ...                     Events should exist post reboot,
@@ -161,6 +163,9 @@
     [Tags]      bmcreboot
     ${pre_reboot_event}=         create a test log
 
+    Initiate Power Off
+    Check Power Off States
+
     ${output}=      Execute Command    /sbin/reboot
     Check If BMC is Up   5 min    10 sec