1*** Settings ***
2Documentation     BMC error polling test to check errors every 10 seconds.
3
4Resource          ../lib/rest_client.robot
5Resource          ../lib/openbmc_ffdc.robot
6Resource          ../lib/resource.robot
7Resource          ../lib/boot_utils.robot
8Resource          ../lib/boot_utils.robot
9Resource          ../lib/bmc_redfish_resource.robot
10Resource          ../lib/esel_utils.robot
11
12Suite Setup       Suite Setup Execution
13Test Teardown     Post Test Case Execution
14
15Force Tags        BMC_Poll_Errors
16
17*** Variables ***
18
19# Default duration and interval of test to run.
20${POLL_DURATION}  48 hours
21${POLL_INTERVAL}  10 second
22
23# Error log Severities to ignore when checking Error Logs.
24@{ESEL_IGNORE_LIST}
25...  xyz.openbmc_project.Logging.Entry.Level.Informational
26
27
28*** Test Cases ***
29
30Poll BMC For Errors
31    [Documentation]  Poll BMC for errors.
32    ...  exist.
33    [Tags]  Poll_BMC_For_Errors
34
35    Redfish.Login
36    Repeat Keyword  ${POLL_DURATION}  Perform GET Request And Check For Errors
37
38
39*** Keywords ***
40
41Perform GET Request And Check For Errors
42    [Documentation]  Check if there is any error reported.
43
44    Redfish.Get  /redfish/v1/Chassis/${CHASSIS_ID}/Sensors
45
46    Event Log Should Not Exist
47    Sleep  ${POLL_INTERVAL}
48
49
50Suite Setup Execution
51    [Documentation]  Do test setup initialization.
52
53    Should Not Be Empty
54    ...  ${OS_HOST}  msg=You must provide hostname or IP of the OS host.
55    Should Not Be Empty
56    ...  ${OS_USERNAME}  msg=You must provide OS host user name.
57    Should Not Be Empty
58    ...  ${OS_PASSWORD}  msg=You must provide OS host user password.
59
60    Redfish Power On  stack_mode=skip
61
62    Run Keyword And Ignore Error  Redfish Purge Event Log
63    Run Keyword And Ignore Error  Redfish Delete All BMC Dumps
64
65
66Post Test Case Execution
67    [Documentation]  Do the post test teardown.
68    ...  1. Capture FFDC on test failure.
69
70    FFDC On Test Case Fail
71    Redfish.Logout
72