1*** Settings ***
2Documentation  This file is resourced by obmc_boot_test.py to set initial
3...            variable values, etc.
4
5Resource  ../lib/openbmc_ffdc.robot
6Library   ../lib/state.py
7
8Library   ../lib/obmc_boot_test.py
9Library   Collections
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'
15@{parm_list}                openbmc_nickname  openbmc_host  openbmc_username
16...  openbmc_password  os_host  os_username  os_password  pdu_host
17...  pdu_username  pdu_password  pdu_slot_no  openbmc_serial_host
18...  openbmc_serial_port  stack_mode  boot_stack  boot_list  max_num_tests
19...  plug_in_dir_paths  status_file_path  openbmc_model  boot_pass  boot_fail
20...  ffdc_dir_path_style  ffdc_check  ffdc_only  ffdc_function_list
21...  state_change_timeout  power_on_timeout  power_off_timeout
22...  boot_fail_threshold  delete_errlogs  test_mode  quiet  debug
23
24# Initialize each program parameter.
25${openbmc_host}             ${EMPTY}
26${openbmc_nickname}         ${openbmc_host}
27${openbmc_username}         root
28${openbmc_password}         0penBmc
29${os_host}                  ${EMPTY}
30${os_username}              root
31${os_password}              P@ssw0rd
32${pdu_host}                 ${EMPTY}
33${pdu_username}             admin
34${pdu_password}             admin
35${pdu_slot_no}              ${EMPTY}
36${openbmc_serial_host}      ${EMPTY}
37${openbmc_serial_port}      ${EMPTY}
38${stack_mode}               normal
39${boot_stack}               ${EMPTY}
40${boot_list}                ${EMPTY}
41${max_num_tests}            0
42${plug_in_dir_paths}        ${EMPTY}
43${status_file_path}         ${EMPTY}
44${openbmc_model}            ${EMPTY}
45# The reason boot_pass and boot_fail are parameters is that it is possible to
46# be called by a program that has already done some tests.  This allows us to
47# keep the grand total.
48${boot_pass}                ${0}
49${boot_fail}                ${0}
50${ffdc_dir_path_style}      ${EMPTY}
51${ffdc_check}               ${EMPTY}
52${ffdc_only}                ${0}
53${ffdc_function_list}       ${EMPTY}
54${state_change_timeout}     3 mins
55${power_on_timeout}         14 mins
56${power_off_timeout}        2 mins
57# If the number of boot failures, exceeds boot_fail_threshold, this program
58# returns non-zero.
59${boot_fail_threshold}      ${0}
60${delete_errlogs}           ${0}
61${test_mode}                0
62${quiet}                    0
63${debug}                    0
64
65# Flag variables.
66# test_really_running is needed by DB_Logging plug-in.
67${test_really_running}      ${1}
68
69
70*** Keywords ***
71OBMC Boot Test
72    [Teardown]  OBMC Boot Test Teardown
73    [Arguments]  ${pos_arg1}=${EMPTY}  &{arguments}
74
75    # Note: If I knew how to specify a keyword teardown in python, I would
76    # rename the "OBMC Boot Test Py" python function to "OBMC Boot Test" and
77    # do away with this robot keyword.
78
79    Run Keyword If  '${pos_arg1}' != '${EMPTY}'
80    ...  Set To Dictionary  ${arguments}  loc_boot_stack=${pos_arg1}
81
82    OBMC Boot Test Py  &{arguments}
83