BMC basic performance before & after bmc dump tests

Resolves openbmc/openbmc-test-automation#1036

Change-Id: Ia95687ffbe99a4cf3d89e718809a24b93f161ed3
Signed-off-by: Sivas SRR <sivas.srr@in.ibm.com>
diff --git a/lib/utils.robot b/lib/utils.robot
index a37a0c4..90f0cfb 100755
--- a/lib/utils.robot
+++ b/lib/utils.robot
@@ -54,6 +54,13 @@
 
 *** Keywords ***
 
+Check BMC Performance
+    [Documentation]  Check BMC basic CPU Mem File system performance.
+
+    Check BMC CPU Performance
+    Check BMC Mem Performance
+    Check BMC File System Performance
+
 Verify PNOR Update
     [Documentation]  Verify that the PNOR is not corrupted.
     # Example:
@@ -727,12 +734,17 @@
     Should be true  ${bmc_mem_percentage} > 10
 
 BMC File System Usage Check
-    [Documentation]   Check the file system space. None should be 100% full
-    ...   except /run/initramfs/ro
+    [Documentation]   Check the file system space. 4 file system should be
+    ...  100% full which is expected
+    # Filesystem                Size      Used Available Use% Mounted on
+    # /dev/root                14.4M     14.4M         0 100% /
+    # /dev/ubiblock0_0         14.4M     14.4M         0 100% /media/rofs-c9249b0e
+    # /dev/ubiblock8_0         19.6M     19.6M         0 100% /media/pnor-ro-8764baa3
+    # /dev/ubiblock4_0         14.4M     14.4M         0 100% /media/rofs-407816c
     ${bmc_fs_usage_output}  ${stderr}=   Execute Command
     ...   ${bmc_file_system_usage_cmd}  return_stderr=True
     Should Be Empty  ${stderr}
-    Should Be True  ${bmc_fs_usage_output}==0
+    Should Be True  ${bmc_fs_usage_output}==4
 
 Check BMC CPU Performance
     [Documentation]   Minimal 10% of proc should be free in 3 sample
diff --git a/tests/test_bmc_dump.robot b/tests/test_bmc_dump.robot
index d4f9685..12ebf36 100644
--- a/tests/test_bmc_dump.robot
+++ b/tests/test_bmc_dump.robot
@@ -6,6 +6,7 @@
 Resource            ../lib/rest_client.robot
 Resource            ../lib/dump_utils.robot
 Resource            ../lib/boot_utils.robot
+Resource            ../lib/utils.robot
 Library             ../lib/bmc_ssh_utils.py
 
 Test Setup          Open Connection And Log In
@@ -16,6 +17,13 @@
 
 *** Test Cases ***
 
+Pre Dump BMC Performance Test
+    [Documentation]  Check performance of memory, CPU & file system of BMC.
+    [Tags]  Pre_Dump_BMC_Performance_Test
+
+    Open Connection And Log In
+    Check BMC Performance
+
 Verify User Initiated BMC Dump
     [Documentation]  Create user initiated BMC dump and verify dump
     ...  entry for it.
@@ -109,6 +117,18 @@
     ${resp}=  OpenBMC Get Request  ${DUMP_ENTRY_URI}/list
     Should Be Equal As Strings  ${resp.status_code}  ${HTTP_NOT_FOUND}
 
+Post Dump BMC Performance Test
+    [Documentation]  Check performance of memory, CPU & file system of BMC.
+    [Tags]  Post_Dump_BMC_Performance_Test
+
+    Open Connection And Log In
+    Check BMC Performance
+
+Post Dump Core Dump Check
+    [Documentation]  Check core dump existence on BMC after code update.
+    [Tags]  Post_Dump_Core_Dump_Check
+
+    Check For Core Dumps
 
 *** Keywords ***