1 # Copyright © 2019 AT&T Intellectual Property. All rights reserved.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
19 echo "Usage: demo.sh <command> [<parameters>]"
21 echo " demo.sh <namespace> init_robot"
22 echo " - Execute both initialize of robot login/password etc"
28 # For docker container environment
30 # Run the testsuite for the passed tag. Valid tags are health
31 # Please clean up logs when you are done...
32 # Note: Do not run multiple concurrent demo.sh/ete.sh as the --display is not parameterized and tests will collide
34 if [ "$1" == "" ] ; then
35 echo "Usage: demo.sh [ init_robot ]"
40 ## if more than 1 tag is supplied, the must be provided with -i or -e
51 read -s -p "WEB Site Password for user 'test': " WEB_PASSWORD
52 if [ "$WEB_PASSWORD" = "" ]; then
54 echo "WEB Password is required for user 'test'"
57 VARIABLES="$VARIABLES -v WEB_PASSWORD:$WEB_PASSWORD"
60 VARIABLES="$VARIABLES -v HOSTS_PREFIX:$1"
78 #export GLOBAL_BUILD_NUMBER=$(docker exec -it ${POD} bash -c "ls -1q /share/logs/ | wc -l ")
79 GLOBAL_BUILD_NUMBER=$(docker exec -it ${POD} bash -c "ls -1q /share/logs/ | wc -l")
80 GLOBAL_BUILD_NUMBER=$(echo "$GLOBAL_BUILD_NUMBER" | tr -d '\r')
81 OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_demo_$TAG
82 DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90))
84 VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py"
85 VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$"
87 docker exec -it ${POD} ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM