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"
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}
24 VARIABLES="--removekeywords name:keystone_interface.*"
26 ## Single argument, it is an include tag
32 ## if more than 1 tag is supplied, the must be provided with -i or -e
40 ROBOT_TAGS="${ROBOT_TAGS} -i $2"
44 ROBOT_TAGS="${ROBOT_TAGS} -e $2"
56 LISTENERS="${LISTENER} --listener $2 "
60 VARIABLEFILES="${VARIABLEFILES} -V $2 "
64 VARIABLES="${VARIABLES} -v $2 "
71 if [ "${ROBOT_TAGS}" = "" ];then
72 ROBOT_TAGS=$DEFAULT_ROBOT_TEST
76 echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}"
77 Xvfb ${DISPLAY} -ac -screen 0 ${RES} +extension RANDR &
79 # Get pid of this spawned process to make sure we kill the correct process later
81 export DISPLAY=${DISPLAY}
84 echo -e "Executing robot tests at log level ${LOG_LEVEL}"
86 ROBOT_LIBS=./robot/library:./robot/library/ONAPLibrary:./robot/library/vcpeutils:./robot/library/heatbridge
88 cd /var/opt/${INSTALL_NAME}
89 python -m robot.run -L ${LOG_LEVEL} -d ${OUTPUT_FOLDER} ${VARIABLEFILES} ${VARIABLES} ${LISTENERS} -P ${ROBOT_LIBS} ${ROBOT_TAGS} /var/opt/${INSTALL_NAME}/robot/testsuites/
92 # Stop Xvfb we started earlier
93 # select it from list of possible Xvfb pids running because
94 # a) there may be multiple Xvfbs running and
95 # b) the XVFBPID may not be the correct if the start did not actually work (unlikely and that may be)
99 if [ $P == $XVFBPID ];then