4 DEFAULT_LOG_LEVEL="TRACE" # Available levels: TRACE, DEBUG, INFO (default), WARN, NONE (no logging)
5 DEFAULT_RES="1280x1024x24"
7 DEFAULT_ROBOT_TEST="-i health"
8 INSTALL_NAME="OpenECOMP_ETE"
9 DEFAULT_OUTPUT_FOLDER=./
11 # Use default if none specified as env var
12 LOG_LEVEL=${LOG_LEVEL:-$DEFAULT_LOG_LEVEL}
13 RES=${RES:-$DEFAULT_RES}
14 DISPLAY=${DISPLAY:-$DEFAULT_DISPLAY}
16 # OUTPUT_FOLDER env variable will be overridden by -d command line argument.
17 OUTPUT_FOLDER=${OUTPUT_FOLDER:-$DEFAULT_OUTPUT_FOLDER}
21 ## Single argument, it is an include tag
27 ## if more than 1 tag is supplied, the must be provided with -i or -e
35 ROBOT_TAGS="${ROBOT_TAGS} -i $2"
39 ROBOT_TAGS="${ROBOT_TAGS} -e $2"
51 VARIABLEFILES="${VARIABLEFILES} -V $2 "
55 VARIABLES="${VARIABLES} -v $2 "
62 if [ "${ROBOT_TAGS}" = "" ];then
63 ROBOT_TAGS=$DEFAULT_ROBOT_TEST
67 echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}"
68 Xvfb ${DISPLAY} -ac -screen 0 ${RES} +extension RANDR &
70 # Get pid of this spawned process to make sure we kill the correct process later
72 export DISPLAY=${DISPLAY}
75 echo -e "Executing robot tests at log level ${LOG_LEVEL}"
77 ROBOT_LIBS=./robot/library:./robot/library/eteutils:./robot/library/heatbridge
79 cd /var/opt/${INSTALL_NAME}
80 python -m robot.run -L ${LOG_LEVEL} -d ${OUTPUT_FOLDER} ${VARIABLEFILES} ${VARIABLES} -P ${ROBOT_LIBS} ${ROBOT_TAGS} $(pwd)
82 # Stop Xvfb we started earlier
83 # select it from list of possible Xvfb pids running because
84 # a) there may be multiple Xvfbs running and
85 # b) the XVFBPID may not be the correct if the start did not actually work (unlikely and that may be)
89 if [ $P == $XVFBPID ];then