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 # To mitigate the chromedriver hanging issue
12 export DBUS_SESSION_BUS_ADDRESS=/dev/null
14 # Use default if none specified as env var
15 LOG_LEVEL=${LOG_LEVEL:-$DEFAULT_LOG_LEVEL}
16 RES=${RES:-$DEFAULT_RES}
17 DISPLAY=${DISPLAY:-$DEFAULT_DISPLAY}
19 # OUTPUT_FOLDER env variable will be overridden by -d command line argument.
20 OUTPUT_FOLDER=${OUTPUT_FOLDER:-$DEFAULT_OUTPUT_FOLDER}
25 ## Single argument, it is an include tag
31 ## if more than 1 tag is supplied, the must be provided with -i or -e
39 ROBOT_TAGS="${ROBOT_TAGS} -i $2"
43 ROBOT_TAGS="${ROBOT_TAGS} -e $2"
55 LISTENERS="${LISTENER} --listener $2 "
59 VARIABLEFILES="${VARIABLEFILES} -V $2 "
63 VARIABLES="${VARIABLES} -v $2 "
70 if [ "${ROBOT_TAGS}" = "" ];then
71 ROBOT_TAGS=$DEFAULT_ROBOT_TEST
75 echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}"
76 Xvfb ${DISPLAY} -ac -screen 0 ${RES} +extension RANDR &
78 # Get pid of this spawned process to make sure we kill the correct process later
80 export DISPLAY=${DISPLAY}
83 echo -e "Executing robot tests at log level ${LOG_LEVEL}"
85 ROBOT_LIBS=./robot/library:./robot/library/eteutils:./robot/library/heatbridge
87 cd /var/opt/${INSTALL_NAME}
88 python -m robot.run -L ${LOG_LEVEL} -d ${OUTPUT_FOLDER} ${VARIABLEFILES} ${VARIABLES} ${LISTENERS} -P ${ROBOT_LIBS} ${ROBOT_TAGS} $(pwd)
91 # Stop Xvfb we started earlier
92 # select it from list of possible Xvfb pids running because
93 # a) there may be multiple Xvfbs running and
94 # b) the XVFBPID may not be the correct if the start did not actually work (unlikely and that may be)
98 if [ $P == $XVFBPID ];then