X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=runTags.sh;h=5381c872a4c90c1c5d03e3fbbbf22a96affac67e;hb=87b84d05616d54df459e8b2628717918d4c81da6;hp=75b792e75205b2b95716d62caf3e4c6a0868ae8d;hpb=3b22a2d4f52f24e0984bb4d712a4cafd83d06d7b;p=testsuite.git diff --git a/runTags.sh b/runTags.sh old mode 100644 new mode 100755 index 75b792e7..5381c872 --- a/runTags.sh +++ b/runTags.sh @@ -5,9 +5,12 @@ DEFAULT_LOG_LEVEL="TRACE" # Available levels: TRACE, DEBUG, INFO (default), WARN DEFAULT_RES="1280x1024x24" DEFAULT_DISPLAY=":99" DEFAULT_ROBOT_TEST="-i health" -INSTALL_NAME="OpenECOMP_ETE" +INSTALL_NAME="ONAP" DEFAULT_OUTPUT_FOLDER=./ +# To mitigate the chromedriver hanging issue +export DBUS_SESSION_BUS_ADDRESS=/dev/null + # Use default if none specified as env var LOG_LEVEL=${LOG_LEVEL:-$DEFAULT_LOG_LEVEL} RES=${RES:-$DEFAULT_RES} @@ -17,51 +20,57 @@ DISPLAY=${DISPLAY:-$DEFAULT_DISPLAY} OUTPUT_FOLDER=${OUTPUT_FOLDER:-$DEFAULT_OUTPUT_FOLDER} VARIABLEFILES= +LISTENERS= +VARIABLES="--removekeywords name:keystone_interface.*" ## Single argument, it is an include tag if [ $# -eq 1 ]; then ROBOT_TAGS="-i $1" fi -## -## if more than 1 tag is supplied, the must be provided with -i or -e +## +## if more than 1 tag is supplied, the must be provided with -i or -e ## while [ $# -gt 1 ] do key="$1" - + case $key in -i|--include) ROBOT_TAGS="${ROBOT_TAGS} -i $2" - shift + shift ;; -e|--exclude) ROBOT_TAGS="${ROBOT_TAGS} -e $2" - shift + shift ;; -d|--outputdir) OUTPUT_FOLDER=$2 shift - ;; - --display) + ;; + --display) DISPLAY=:$2 - shift + shift ;; - -V) + --listener) + LISTENERS="${LISTENER} --listener $2 " + shift + ;; + -V) VARIABLEFILES="${VARIABLEFILES} -V $2 " - shift + shift ;; - -v) + -v) VARIABLES="${VARIABLES} -v $2 " - shift + shift ;; esac shift -done +done if [ "${ROBOT_TAGS}" = "" ];then ROBOT_TAGS=$DEFAULT_ROBOT_TEST -fi +fi # Start Xvfb echo -e "Starting Xvfb on display ${DISPLAY} with res ${RES}" @@ -74,15 +83,16 @@ export DISPLAY=${DISPLAY} # Execute tests echo -e "Executing robot tests at log level ${LOG_LEVEL}" -ROBOT_LIBS=./robot/library:./robot/library/eteutils:./robot/library/heatbridge +ROBOT_LIBS=./robot/library:./robot/library/ONAPLibrary:./robot/library/vcpeutils:./robot/library/heatbridge cd /var/opt/${INSTALL_NAME} -python -m robot.run -L ${LOG_LEVEL} -d ${OUTPUT_FOLDER} ${VARIABLEFILES} ${VARIABLES} -P ${ROBOT_LIBS} ${ROBOT_TAGS} $(pwd) +python -m robot.run -L ${LOG_LEVEL} -d ${OUTPUT_FOLDER} ${VARIABLEFILES} ${VARIABLES} ${LISTENERS} -P ${ROBOT_LIBS} ${ROBOT_TAGS} /var/opt/${INSTALL_NAME}/robot/testsuites/ +RET_CODE=$? # Stop Xvfb we started earlier # select it from list of possible Xvfb pids running because -# a) there may be multiple Xvfbs running and -# b) the XVFBPID may not be the correct if the start did not actually work (unlikely and that may be) +# a) there may be multiple Xvfbs running and +# b) the XVFBPID may not be the correct if the start did not actually work (unlikely and that may be) PIDS=$(pgrep Xvfb) for P in $PIDS do @@ -90,3 +100,5 @@ do kill -9 $P fi done + +exit $RET_CODE