Michael Walsh | b5839d0 | 2017-04-12 16:11:20 -0500 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation This file is resourced by obmc_boot_test.py to set initial |
| 3 | ... variable values, etc. |
| 4 | |
| 5 | Resource ../lib/openbmc_ffdc.robot |
| 6 | Library ../lib/state.py |
| 7 | |
| 8 | Library ../lib/obmc_boot_test.py |
Michael Walsh | ff34000 | 2017-08-29 11:18:27 -0500 | [diff] [blame] | 9 | Library Collections |
Michael Walsh | b5839d0 | 2017-04-12 16:11:20 -0500 | [diff] [blame] | 10 | |
| 11 | *** Variables *** |
| 12 | # Initialize program parameters variables. |
| 13 | # Create parm_list containing all of our program parameters. This is used by |
| 14 | # 'Rqprint Pgm Header' |
Michael Walsh | 046fe22 | 2019-11-08 14:33:53 -0600 | [diff] [blame] | 15 | @{parm_list} openbmc_nickname ssh_port https_port openbmc_host openbmc_username |
Michael Walsh | 0a3bdb4 | 2019-01-31 16:21:44 +0000 | [diff] [blame] | 16 | ... openbmc_password rest_username rest_password ipmi_username |
| 17 | ... ipmi_password os_host os_username os_password pdu_host pdu_username |
| 18 | ... pdu_password pdu_slot_no openbmc_serial_host openbmc_serial_port |
| 19 | ... stack_mode boot_stack boot_list max_num_tests plug_in_dir_paths |
| 20 | ... status_file_path openbmc_model boot_pass boot_fail ffdc_dir_path_style |
| 21 | ... ffdc_check ffdc_only ffdc_function_list state_change_timeout |
| 22 | ... power_on_timeout power_off_timeout boot_fail_threshold delete_errlogs |
Michael Walsh | a3e7b22 | 2020-02-03 15:32:16 -0600 | [diff] [blame] | 23 | ... call_post_stack_plug do_pre_boot_plug_in_setup boot_table_path test_mode quiet debug |
Michael Walsh | b5839d0 | 2017-04-12 16:11:20 -0500 | [diff] [blame] | 24 | |
| 25 | # Initialize each program parameter. |
Michael Walsh | 7769961 | 2019-07-17 09:47:28 -0500 | [diff] [blame] | 26 | ${openbmc_host} ${EMPTY} |
Michael Walsh | 046fe22 | 2019-11-08 14:33:53 -0600 | [diff] [blame] | 27 | ${ssh_port} 22 |
| 28 | ${https_port} 443 |
Michael Walsh | 7769961 | 2019-07-17 09:47:28 -0500 | [diff] [blame] | 29 | ${openbmc_nickname} ${openbmc_host} |
| 30 | ${openbmc_username} root |
| 31 | ${openbmc_password} 0penBmc |
| 32 | ${rest_username} ${openbmc_username} |
| 33 | ${rest_password} ${openbmc_password} |
| 34 | ${ipmi_username} ${openbmc_username} |
| 35 | ${ipmi_password} ${openbmc_password} |
| 36 | ${os_host} ${EMPTY} |
| 37 | ${os_username} root |
| 38 | ${os_password} P@ssw0rd |
| 39 | ${pdu_host} ${EMPTY} |
| 40 | ${pdu_username} admin |
| 41 | ${pdu_password} admin |
| 42 | ${pdu_slot_no} ${EMPTY} |
| 43 | ${openbmc_serial_host} ${EMPTY} |
| 44 | ${openbmc_serial_port} ${EMPTY} |
| 45 | ${stack_mode} normal |
| 46 | ${boot_stack} ${EMPTY} |
| 47 | ${boot_list} ${EMPTY} |
| 48 | ${max_num_tests} 0 |
| 49 | ${plug_in_dir_paths} ${EMPTY} |
| 50 | ${status_file_path} ${EMPTY} |
| 51 | ${openbmc_model} ${EMPTY} |
Michael Walsh | b5839d0 | 2017-04-12 16:11:20 -0500 | [diff] [blame] | 52 | # The reason boot_pass and boot_fail are parameters is that it is possible to |
| 53 | # be called by a program that has already done some tests. This allows us to |
| 54 | # keep the grand total. |
Michael Walsh | 7769961 | 2019-07-17 09:47:28 -0500 | [diff] [blame] | 55 | ${boot_pass} ${0} |
| 56 | ${boot_fail} ${0} |
| 57 | ${ffdc_dir_path_style} ${EMPTY} |
| 58 | ${ffdc_check} ${EMPTY} |
| 59 | ${ffdc_only} ${0} |
| 60 | ${ffdc_function_list} ${EMPTY} |
| 61 | ${state_change_timeout} 3 mins |
| 62 | ${power_on_timeout} 14 mins |
| 63 | ${power_off_timeout} 2 mins |
Michael Walsh | b5839d0 | 2017-04-12 16:11:20 -0500 | [diff] [blame] | 64 | # If the number of boot failures, exceeds boot_fail_threshold, this program |
| 65 | # returns non-zero. |
Michael Walsh | 7769961 | 2019-07-17 09:47:28 -0500 | [diff] [blame] | 66 | ${boot_fail_threshold} ${0} |
| 67 | ${delete_errlogs} ${0} |
Michael Walsh | 89de14a | 2018-10-01 16:51:37 -0500 | [diff] [blame] | 68 | # This variable indicates whether post_stack plug-in processing should be done. |
Michael Walsh | 7769961 | 2019-07-17 09:47:28 -0500 | [diff] [blame] | 69 | ${call_post_stack_plug} ${1} |
| 70 | # do_pre_boot_plug_in_setup is only heeded when -v ffdc_only:1. Callers may |
| 71 | # choose whether to run pre_boot_plug_in_setup which clears existing FFDC file |
| 72 | # lists and sets new ffdc_prefix value. |
| 73 | ${do_pre_boot_plug_in_setup} ${1} |
Michael Walsh | a3e7b22 | 2020-02-03 15:32:16 -0600 | [diff] [blame] | 74 | # The path to the boot_table.json file which defines the boot requirements. This defaults to the value of |
| 75 | # the BOOT_TABLE_PATH environment variable or to data/boot_table.json. |
| 76 | ${boot_table_path} ${None} |
Michael Walsh | 7769961 | 2019-07-17 09:47:28 -0500 | [diff] [blame] | 77 | ${test_mode} 0 |
| 78 | ${quiet} 0 |
| 79 | ${debug} 0 |
Michael Walsh | b5839d0 | 2017-04-12 16:11:20 -0500 | [diff] [blame] | 80 | |
| 81 | # Flag variables. |
| 82 | # test_really_running is needed by DB_Logging plug-in. |
| 83 | ${test_really_running} ${1} |
| 84 | |
Michael Walsh | 83f4bc7 | 2017-04-20 16:49:43 -0500 | [diff] [blame] | 85 | |
| 86 | *** Keywords *** |
Michael Walsh | 83f4bc7 | 2017-04-20 16:49:43 -0500 | [diff] [blame] | 87 | OBMC Boot Test |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 88 | [Documentation] Run the OBMC boot test. |
Michael Walsh | 83f4bc7 | 2017-04-20 16:49:43 -0500 | [diff] [blame] | 89 | [Teardown] OBMC Boot Test Teardown |
Michael Walsh | ff34000 | 2017-08-29 11:18:27 -0500 | [diff] [blame] | 90 | [Arguments] ${pos_arg1}=${EMPTY} &{arguments} |
Michael Walsh | 83f4bc7 | 2017-04-20 16:49:43 -0500 | [diff] [blame] | 91 | |
| 92 | # Note: If I knew how to specify a keyword teardown in python, I would |
| 93 | # rename the "OBMC Boot Test Py" python function to "OBMC Boot Test" and |
| 94 | # do away with this robot keyword. |
| 95 | |
Michael Walsh | ff34000 | 2017-08-29 11:18:27 -0500 | [diff] [blame] | 96 | Run Keyword If '${pos_arg1}' != '${EMPTY}' |
| 97 | ... Set To Dictionary ${arguments} loc_boot_stack=${pos_arg1} |
| 98 | |
| 99 | OBMC Boot Test Py &{arguments} |