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