Re-order BMC dump test case

Changes:
    - Change teardown keyword.
    - Modify the flow of the test by ordering test cases.

Resolves  openbmc/openbmc-test-automation#1132

Change-Id: Ia3c1334174a66d4a7597af4cd3ff49dd242ba0ea
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/tests/test_bmc_dump.robot b/tests/test_bmc_dump.robot
index 2ee4f64..bd21288 100644
--- a/tests/test_bmc_dump.robot
+++ b/tests/test_bmc_dump.robot
@@ -10,10 +10,7 @@
 Library             ../lib/bmc_ssh_utils.py
 
 Test Setup          Open Connection And Log In
-Test Teardown       Post Testcase Execution
-
-*** Variables ***
-
+Test Teardown       Test Teardown Execution
 
 *** Test Cases ***
 
@@ -24,6 +21,7 @@
     Open Connection And Log In
     Check BMC Performance
 
+
 Verify User Initiated BMC Dump When Powered Off
     [Documentation]  Create user initiated BMC dump at host off state and
     ...  verify dump entry for it.
@@ -33,13 +31,16 @@
     Create User Initiated Dump
 
 
-Verify User Initiated BMC Dump When Host Booted
-    [Documentation]  Create user initiated BMC dump at host booted state and
-    ...  verify dump entry for it.
-    [Tags]  Verify_User_Initiated_BMC_Dump_When_Host_Booted
+Verify Dump Persistency On Reset
+    [Documentation]  Create user dump, reset BMC and verify dump persistency.
+    [Tags]  Verify_Dump_Persistency_On_Reset
 
-    REST Power On  stack_mode=skip  quiet=1
+    Delete All BMC Dump
     Create User Initiated Dump
+    OBMC Reboot (off)
+    ${resp}=  OpenBMC Get Request  ${DUMP_ENTRY_URI}/list
+    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
+
 
 Verify Dump Persistency On Service Restart
     [Documentation]  Create user dump, restart BMC service and verify dump
@@ -56,17 +57,6 @@
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
 
 
-Verify Dump Persistency On Reset
-    [Documentation]  Create user dump, reset BMC and verify dump persistency.
-    [Tags]  Verify_Dump_Persistency_On_Reset
-
-    Delete All BMC Dump
-    Create User Initiated Dump
-    OBMC Reboot (off)
-    ${resp}=  OpenBMC Get Request  ${DUMP_ENTRY_URI}/list
-    Should Be Equal As Strings  ${resp.status_code}  ${HTTP_OK}
-
-
 Delete User Initiated BMC Dump And Verify
     [Documentation]  Delete user initiated dump and verify.
     [Tags]  Delete_User_Initiated_Dump_And_Verify
@@ -124,6 +114,16 @@
     ${resp}=  OpenBMC Get Request  ${DUMP_ENTRY_URI}/list
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_NOT_FOUND}
 
+
+Verify User Initiated BMC Dump When Host Booted
+    [Documentation]  Create user initiated BMC dump at host booted state and
+    ...  verify dump entry for it.
+    [Tags]  Verify_User_Initiated_BMC_Dump_When_Host_Booted
+
+    REST Power On  stack_mode=skip  quiet=1
+    Create User Initiated Dump
+
+
 Post Dump BMC Performance Test
     [Documentation]  Check performance of memory, CPU & file system of BMC.
     [Tags]  Post_Dump_BMC_Performance_Test
@@ -139,7 +139,7 @@
 
 *** Keywords ***
 
-Post Testcase Execution
+Test Teardown Execution
     [Documentation]  Do the post test teardown.
 
     Wait Until Keyword Succeeds  3 min  15 sec  Verify No Dump In Progress