2 ################################################################################
3 # Copyright (c) 2019 AT&T Intellectual Property. #
4 # Copyright (c) 2019 Nokia. #
6 # Licensed under the Apache License, Version 2.0 (the "License"); #
7 # you may not use this file except in compliance with the License. #
8 # You may obtain a copy of the License at #
10 # http://www.apache.org/licenses/LICENSE-2.0 #
12 # Unless required by applicable law or agreed to in writing, software #
13 # distributed under the License is distributed on an "AS IS" BASIS, #
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
15 # See the License for the specific language governing permissions and #
16 # limitations under the License. #
17 ################################################################################
21 # Run the testsuite for the passed tag. Valid tags are health
22 # Please clean up logs when you are done...
23 # Note: Do not run multiple concurrent ete.sh as the --display is not parameterized and tests will collide
25 if [ "$1" == "" ] || [ "$2" == "" ]; then
26 echo "Usage: ete-k8s.sh <namespace> <tag> [input variable]"
27 echo " <tag>: health etetests e2mgrtests"
28 echo " [input variable] is added to runTags with "-v" prepended"
29 echo " example : TEST_NODE_B_IP:10.240.0.217 "
30 echo " example : \"TEST_NODE_B_IP:10.240.0.217 -v TEST_NODE_B_PORT:36421 -v TEST_NODE_B_NAME:AAAA123456\""
31 echo " NOTE1: TEST_NODE_B_NAME is 4 upper case letters and then 6 numbers in Dashboard validation "
32 echo " NOTE2: TEST_NODE_B_PORT real nodeB's use 36422 but e2sim must be on a port other than 36422"
45 if [ "$3" != "" ] ; then
53 POD=$(kubectl --namespace $NAMESPACE get pod -l robotImplementation=ric-robot --no-headers=true | sed 's/ .*//')
59 export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l")
60 OUTPUT_FOLDER=$(printf %04d $GLOBAL_BUILD_NUMBER)_ete_$2
61 DISPLAY_NUM=$(($GLOBAL_BUILD_NUMBER + 90))
63 VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py"
64 VARIABLES="$VARIABLES -v GLOBAL_BUILD_NUMBER:$$"
66 kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display $DISPLAY_NUM