Check for application failure from journal.
Resolves openbmc/openbmc-test-automation#617
Change-Id: I3ae1f54e2226599952aea2675eb8023f845c5203
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/test_lists/HW_CI b/test_lists/HW_CI
index 9a6907e..9843029 100644
--- a/test_lists/HW_CI
+++ b/test_lists/HW_CI
@@ -2,3 +2,5 @@
-i Test_SSL_Connection
#Basic poweron test
-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 051c964..9692e78 100644
--- a/tests/test_basic_poweron.robot
+++ b/tests/test_basic_poweron.robot
@@ -16,6 +16,9 @@
# By default 2 cycle for CI/CT.
${LOOP_COUNT} ${2}
+# Error strings to check from journald.
+${ERROR_REGEX} SEGV|core-dump
+
*** Test Cases ***
Power On Test
@@ -24,6 +27,18 @@
Repeat Keyword ${LOOP_COUNT} times Host Off And On
+
+Check For Application Failures
+ [Documentation] Parse the journal log and check for failures.
+ [Tags] Check_For_Application_Failures
+
+ Open Connection And Log In
+
+ ${journal_log}= Execute Command On BMC
+ ... journalctl --no-pager | egrep '${ERROR_REGEX}'
+
+ Should Be Empty ${journal_log}
+
*** Keywords ***
Test Exit Logs