blob: b1a7283d806cac2491484104fc698c757e31ffd0 [file] [log] [blame]
Mandeep Khindad6ea9872017-06-24 11:49:37 -04001#!/bin/bash
2
3#
4# Run the testsuite for the passed tag. Valid tags are ete, health, closedloop, instantiate
5# Please clean up logs when you are done...
6# Note: Do not run multiple concurrent ete.sh as the --display is not parameterized and tests will collide
7#
BorislavG8bfc6cf2018-02-27 15:04:26 +00008if [ "$1" == "" ] || [ "$2" == "" ]; then
Helen Chen2d722902018-04-12 18:57:14 -07009 echo "Usage: ete-k8s.sh [namespace] [ health | ete | closedloop | instantiate | distribute ]"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040010 exit
11fi
12
Brian Freeman6b89ba02018-04-23 20:54:13 -050013
BorislavG8bfc6cf2018-02-27 15:04:26 +000014export NAMESPACE="$1"
Brian Freeman6b89ba02018-04-23 20:54:13 -050015
16POD=$(kubectl --namespace $NAMESPACE get pods | sed 's/ .*//'| grep robot)
17
18
BorislavG8bfc6cf2018-02-27 15:04:26 +000019export TAGS="-i $2"
Mandeep Khindad6ea9872017-06-24 11:49:37 -040020export ETEHOME=/var/opt/OpenECOMP_ETE
Brian Freeman6b89ba02018-04-23 20:54:13 -050021export GLOBAL_BUILD_NUMBER=$(kubectl --namespace $NAMESPACE exec ${POD} -- bash -c "ls -1q /share/logs/ | wc -l")
22export OUTPUT_FOLDER=ETE_$(printf %04d $GLOBAL_BUILD_NUMBER)_$2
23
24#export OUTPUT_FOLDER=ETE_$$
Mandeep Khindad6ea9872017-06-24 11:49:37 -040025
26VARIABLEFILES="-V /share/config/vm_properties.py -V /share/config/integration_robot_properties.py -V /share/config/integration_preload_parameters.py"
27VARIABLES="-v GLOBAL_BUILD_NUMBER:$$"
28
BorislavG8bfc6cf2018-02-27 15:04:26 +000029kubectl --namespace $NAMESPACE exec ${POD} -- ${ETEHOME}/runTags.sh ${VARIABLEFILES} ${VARIABLES} -d /share/logs/${OUTPUT_FOLDER} ${TAGS} --display 88
Brian Freeman6b89ba02018-04-23 20:54:13 -050030