George Keishing | 4346a41 | 2016-07-19 11:26:49 -0500 | [diff] [blame] | 1 | *** Settings *** |
George Keishing | 69e6f71 | 2016-09-12 06:30:09 -0500 | [diff] [blame] | 2 | Documentation This module is for data collection on test case failure |
| 3 | ... for openbmc systems. Collects data with default name |
| 4 | ... ffdc_report.txt under directory logs/testSuite/testName/ |
| 5 | ... on failure. |
| 6 | ... FFDC logging sample layout: |
| 7 | ... logs |
| 8 | ... ├── 20160909102538035251_TestWarmreset |
| 9 | ... │ └── 20160909102538035251_TestWarmResetviaREST |
Gunnar Mills | 50070fa | 2016-11-14 11:17:30 -0600 | [diff] [blame] | 10 | ... │ ├── 20160909102538035251_BMC_journalctl.txt |
| 11 | ... │ ├── 20160909102538035251_BMC_proc_list.txt |
| 12 | ... │ ├── 20160909102538035251_BMC_dmesg.txt |
| 13 | ... │ ├── 20160909102538035251_BMC_inventory.txt |
| 14 | ... │ ├── 20160909102538035251_BMC_led.txt |
| 15 | ... │ ├── 20160909102538035251_BMC_record_log.txt |
| 16 | ... │ ├── 20160909102538035251_BMC_sensor_list.txt |
Gunnar Mills | aca140d | 2016-10-26 13:05:10 -0500 | [diff] [blame] | 17 | ... │ ├── 20160909102538035251_BMC_general.txt |
Gunnar Mills | 50070fa | 2016-11-14 11:17:30 -0600 | [diff] [blame] | 18 | ... │ ├── 20160909102538035251_OS_dmesg.txt |
| 19 | ... │ ├── 20160909102538035251_OS_msglog.txt |
| 20 | ... │ ├── 20160909102538035251_OS_cpufrequency.txt |
| 21 | ... │ ├── 20160909102538035251_OS_boot.txt |
| 22 | ... │ ├── 20160909102538035251_OS_isusb.txt |
| 23 | ... │ ├── 20160909102538035251_OS_kern.txt |
| 24 | ... │ ├── 20160909102538035251_OS_authlog.txt |
| 25 | ... │ ├── 20160909102538035251_OS_syslog.txt |
| 26 | ... │ ├── 20160909102538035251_OS_info.txt |
| 27 | ... │ ├── 20160909102538035251_OS_rsct.txt |
Sweta Potthuri | 92e7b13 | 2017-03-17 06:02:32 -0500 | [diff] [blame] | 28 | ... │ ├── 20160909102538035251_OS_secure.txt |
| 29 | ... │ └── 20160909102538035251_OS_esel |
George Keishing | 69e6f71 | 2016-09-12 06:30:09 -0500 | [diff] [blame] | 30 | ... └── test_history.txt |
George Keishing | 4346a41 | 2016-07-19 11:26:49 -0500 | [diff] [blame] | 31 | |
George Keishing | 69e6f71 | 2016-09-12 06:30:09 -0500 | [diff] [blame] | 32 | Resource openbmc_ffdc_methods.robot |
| 33 | Resource openbmc_ffdc_utils.robot |
George Keishing | 6a6e76d | 2017-09-14 08:19:17 -0500 | [diff] [blame] | 34 | Resource dump_utils.robot |
Michael Walsh | 769c2a1 | 2016-12-13 15:45:17 -0600 | [diff] [blame] | 35 | Library openbmc_ffdc.py |
George Keishing | 4346a41 | 2016-07-19 11:26:49 -0500 | [diff] [blame] | 36 | |
| 37 | *** Keywords *** |
| 38 | |
Gunnar Mills | eac1af2 | 2016-11-14 15:30:09 -0600 | [diff] [blame] | 39 | FFDC On Test Case Fail |
George Keishing | 4346a41 | 2016-07-19 11:26:49 -0500 | [diff] [blame] | 40 | [Documentation] Generic FFDC entry point. Place holder to hook in |
George Keishing | 69e6f71 | 2016-09-12 06:30:09 -0500 | [diff] [blame] | 41 | ... other data collection methods |
Rahul Maheshwari | 09439a2 | 2017-02-23 01:10:05 -0600 | [diff] [blame] | 42 | ... 1. Collect Logs if test fails or host reaches quiesced |
| 43 | ... state. |
George Keishing | 6a6e76d | 2017-09-14 08:19:17 -0500 | [diff] [blame] | 44 | ... 2. Added test execution history logging. |
George Keishing | 69e6f71 | 2016-09-12 06:30:09 -0500 | [diff] [blame] | 45 | ... By default this will log Test status PASS/FAIL format |
| 46 | ... EX: 20160822041250932049:Test:Test case 1:PASS |
| 47 | ... 20160822041250969913:Test:Test case 2:FAIL |
George Keishing | 6a6e76d | 2017-09-14 08:19:17 -0500 | [diff] [blame] | 48 | ... 3. Delete error logs and BMC dumps post FFDC collection. |
Joy Onyerikwu | d806cc0 | 2019-10-01 07:46:18 -0500 | [diff] [blame] | 49 | [Arguments] ${clean_up}=${TRUE} |
| 50 | # Description of argument(s): |
| 51 | # clean_up: Boolean value indicating whether error logs and dumps should be deleted on test failure after |
| 52 | # FFDC collection. |
George Keishing | 4346a41 | 2016-07-19 11:26:49 -0500 | [diff] [blame] | 53 | |
George Keishing | 7f0dd25 | 2019-04-29 02:02:59 -0500 | [diff] [blame] | 54 | ${OVERRIDE_FFDC_ON_TEST_CASE_FAIL}= Get Environment Variable OVERRIDE_FFDC_ON_TEST_CASE_FAIL 0 |
Michael Walsh | fa84c8f | 2019-04-24 16:44:49 -0500 | [diff] [blame] | 55 | ${OVERRIDE_FFDC_ON_TEST_CASE_FAIL}= Convert To Integer ${OVERRIDE_FFDC_ON_TEST_CASE_FAIL} |
George Keishing | 7f0dd25 | 2019-04-29 02:02:59 -0500 | [diff] [blame] | 56 | Return From Keyword If ${OVERRIDE_FFDC_ON_TEST_CASE_FAIL} |
Michael Walsh | fa84c8f | 2019-04-24 16:44:49 -0500 | [diff] [blame] | 57 | |
George Keishing | 6a6e76d | 2017-09-14 08:19:17 -0500 | [diff] [blame] | 58 | Run Keyword If '${TEST_STATUS}' == 'FAIL' FFDC |
George Keishing | 69e6f71 | 2016-09-12 06:30:09 -0500 | [diff] [blame] | 59 | |
| 60 | Log Test Case Status |
George Keishing | 6a6e76d | 2017-09-14 08:19:17 -0500 | [diff] [blame] | 61 | |
| 62 | # Clean up error logs and BMC dumps. |
Joy Onyerikwu | d806cc0 | 2019-10-01 07:46:18 -0500 | [diff] [blame] | 63 | Run Keyword If '${TEST_STATUS}' == 'FAIL' and ${clean_up} |
George Keishing | 32fe4e1 | 2018-07-13 05:06:47 -0500 | [diff] [blame] | 64 | ... Run Keywords Delete All Error Logs AND Delete All Dumps |