Michael Walsh | a2a553c | 2017-01-10 11:17:38 -0600 | [diff] [blame] | 1 | *** Settings *** |
| 2 | Documentation Run the caller's keyword string. |
| 3 | |
Michael Walsh | e7a7a18 | 2017-01-19 10:37:10 -0600 | [diff] [blame] | 4 | # Description of parameters: |
| 5 | # keyword_string The keyword string to be run by this program. If this |
| 6 | # keyword string contains " ; " anywhere, it will be taken to |
| 7 | # be multiple keyword strings (see example below). Each |
| 8 | # keywrod may also include a variable assignment. Example: |
| 9 | # ${my_var}= My Keyword |
| 10 | # lib_file_path The path to a library or resource needed to run the keywords. |
| 11 | # This may contain a colon-delimited list of library/resource |
| 12 | # paths. |
| 13 | # test_mode This means that this program should go through all the |
| 14 | # motions but not actually do anything substantial. |
| 15 | # debug If this parameter is set to "1", this program will print |
| 16 | # additional debug information. |
| 17 | # quiet If this parameter is set to "1", this program will print |
| 18 | # only essential information, i.e. it will not echo parameters, |
| 19 | # echo commands, print the total run time, etc. |
| 20 | |
| 21 | # Example calls: |
| 22 | # cd $HOME/git/openbmc-test-automation |
| 23 | # export PYTHONPATH=${HOME}/git/openbmc-test-automation/lib/ |
| 24 | |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 25 | # robot --outputdir=/tmp -v OPENBMC_HOST:barp01 -v 'keyword_string:Log To Console Hi.' |
| 26 | # extended/run_keyword.robot |
Michael Walsh | e7a7a18 | 2017-01-19 10:37:10 -0600 | [diff] [blame] | 27 | |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 28 | # robot --outputdir=/tmp -v OPENBMC_HOST:barp01 |
| 29 | # -v 'keyword_string:${state}= Get State quiet=${1} ; Rpvar state' |
| 30 | # -v lib_file_path:state.py extended/run_keyword.robot |
Michael Walsh | e7a7a18 | 2017-01-19 10:37:10 -0600 | [diff] [blame] | 31 | |
Michael Walsh | a2a553c | 2017-01-10 11:17:38 -0600 | [diff] [blame] | 32 | # NOTE: Robot searches PYTHONPATH for libraries. |
| 33 | Library run_keyword.py |
| 34 | |
Sweta Potthuri | 5db43e4 | 2017-06-15 05:36:44 -0500 | [diff] [blame] | 35 | Force Tags Run_Keyword_Pgm |
Michael Walsh | a2a553c | 2017-01-10 11:17:38 -0600 | [diff] [blame] | 36 | |
| 37 | *** Variables *** |
| 38 | # Initialize program parameters variables. |
| 39 | # Create parm_list containing all of our program parameters. parm_list is |
| 40 | # used by "rqprint_pgm_header". |
| 41 | @{parm_list} keyword_string lib_file_path test_mode quiet |
| 42 | ... debug |
| 43 | |
| 44 | # Initialize each program parameter. |
| 45 | ${keyword_string} ${EMPTY} |
| 46 | ${lib_file_path} ${EMPTY} |
| 47 | ${test_mode} 0 |
| 48 | ${quiet} 0 |
| 49 | ${debug} 0 |
| 50 | |
| 51 | |
| 52 | *** Test Cases *** |
| 53 | Run Keyword Pgm |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 54 | [Documentation] Run the keyword program. |
Michael Walsh | a2a553c | 2017-01-10 11:17:38 -0600 | [diff] [blame] | 55 | Main |
| 56 | |
| 57 | *** Keywords *** |
Michael Walsh | a2a553c | 2017-01-10 11:17:38 -0600 | [diff] [blame] | 58 | Main |
Joy Onyerikwu | f4a807b | 2018-06-20 08:43:54 -0500 | [diff] [blame] | 59 | [Documentation] Do main program processing. |
Michael Walsh | a2a553c | 2017-01-10 11:17:38 -0600 | [diff] [blame] | 60 | [Teardown] Program Teardown |
| 61 | |
| 62 | Main Py |