2 INSTALL_DIR=/var/opt/ONAP
4 #####################################################################
5 # Start display on 256 if it has not already been started...
6 # This will stay up and be used for all soak tests
7 # Tried this once and got an unexpected error so restored the start/kill
8 # pattern for each test for now.
9 # Perhaps the error was unrelated to the using the same display for
10 # all tests. Preserve this just in case....
11 function start_display_if
14 xdpyinfo -display $DISPLAY >/dev/null 2>&1
18 echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}"
19 Xvfb ${DISPLAY} -ac -screen 0 ${RES} +extension RANDR &
24 #####################################################################
25 function start_display
27 export DISPLAY=:$(( $TEST_NUMBER % 256 ))
28 xdpyinfo -display $DISPLAY >/dev/null 2>&1
31 DISPLAY=$(( $RANDOM % 1000 ))
32 xdpyinfo -display $DISPLAY >/dev/null 2>&1
35 echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}"
36 Xvfb ${DISPLAY} -ac -screen 0 ${RES} +extension RANDR &
39 echo ${DISPLAY} > /tmp/robotDisplay.$TEST_NUMBER
40 # Get and save pid of this spawned process to make sure we kill the correct process later
43 #####################################################################
46 xdpyinfo -display $DISPLAY >/dev/null 2>&1
48 kill -9 $XVFBPID >/dev/null 2>&1
50 rm -rf /tmp/robotDisplay.$TEST_NUMBER
53 #####################################################################
55 #####################################################################
59 if [ "$TEST_NUMBER" = "" ];then
63 # Use default if none specified as env var
64 DEFAULT_LOG_LEVEL="INFO" # Available levels: TRACE, DEBUG, INFO (default), WARN, NONE (no logging)
65 LOG_LEVEL=${LOG_LEVEL:-$DEFAULT_LOG_LEVEL}
67 # To mitigate the chromedriver hanging issue
68 export DBUS_SESSION_BUS_ADDRESS=/dev/null
71 OUTPUT_FOLDER=/share/logs/${SOAKSUBFOLDER}runEteTag_$TEST_NUMBER
72 mkdir -p $OUTPUT_FOLDER
73 INSTALL_DIR="/var/opt/ONAP"
75 ROBOT_LIBS=./robot/library:./robot/library/ONAPLibrary:./robot/library/heatbridge
76 VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py"
77 VARIABLES="-v GLOBAL_BUILD_NUMBER:$TEST_NUMBER"
83 echo -e "Executing robot test ${ROBOT_TAG} at log level ${LOG_LEVEL}"
86 python -m robot.run -L ${LOG_LEVEL} -d ${OUTPUT_FOLDER} ${VARIABLEFILES} ${VARIABLES} ${LISTENERS} -P ${ROBOT_LIBS} -i ${ROBOT_TAG} $(pwd) > ${OUTPUT_FOLDER}/robot.out 2>&1
88 ####################################################################
89 # Stop Xvfb we started earlier