Test to check application services running at standby

Changes:
    - Added test to verify there are no pending services to complete
      when BMC is booted to standby.
    - Added tag include in HW_CI.

Change-Id: I8af817ac5d0c5e82a2d5d2a2282a28dcfd75a834
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/test_lists/HW_CI b/test_lists/HW_CI
index 3771c65..5f459e0 100644
--- a/test_lists/HW_CI
+++ b/test_lists/HW_CI
@@ -4,6 +4,7 @@
 -i Test_SSL_Connection
 #Basic poweron test
 -i Verify_Front_And_Rear_LED_At_Standby
+-i Verify_Application_Services_Running_At_Standby
 -i Power_On_Test
 #Check for apps failures.
 -i Check_For_Application_Failures
diff --git a/tests/test_basic_poweron.robot b/tests/test_basic_poweron.robot
index bb5e780..b91610a 100644
--- a/tests/test_basic_poweron.robot
+++ b/tests/test_basic_poweron.robot
@@ -37,6 +37,29 @@
     Verify Identify LED State  Off
 
 
+Verify Application Services Running At Standby
+    [Documentation]  Check if there are services that have not completed.
+    [Tags]  Verify_Application_Services_Running_At_Standby
+
+    # Application services running on the BMC are not tightly coupled.
+    # At standby, there shouldn't be any pending job waiting to complete.
+    # Examples:
+    # Failure o/p:
+    # root@witherspoon:~# systemctl list-jobs --no-pager | cat
+    #    JOB UNIT                                     TYPE  STATE
+    # 35151 xyz.openbmc_project.ObjectMapper.service start running
+    # 1 jobs listed.
+    #
+    # Success o/p:
+    # root@witherspoon:~# systemctl list-jobs --no-pager | cat
+    # No jobs running.
+
+    REST Power Off  stack_mode=skip  quiet=1
+    ${stdout}  ${stderr}  ${rc}=  BMC Execute Command
+    ...  systemctl list-jobs --no-pager | cat
+    Should Be Equal As Strings  ${stdout}  No jobs running.
+
+
 Power On Test
     [Documentation]  Power off and on.
     [Tags]  Power_On_Test