blob: 158f49704b704c26ae2b074a68f90a9d73225306 [file] [log] [blame]
Stone, Avi (as206k)eaf57062018-04-12 15:57:26 +03001#!/bin/bash
2
3function help_usage ()
4{
5 echo
6 echo "$0 (<jar_file_name> <suite file name>)"
7 echo
8 exit 2
9}
10
11function isBoolean ()
12{
13 PARAM_NAME=$1
14 VALUE=$2
15 if [[ ${VALUE} != "true" ]] && [[ ${VALUE} != "false" ]]; then
16 echo "Valid parameter" ${PARAM_NAME} "values are: true/false"
17 help_usage
18 fi
19}
20
21#main
22[ $# -lt 2 ] && help_usage
23
24JAR_FILE=$1
25SUITE_FILE=$2
26
27CURRENT_DIR=`pwd`
28BASEDIR=$(dirname $0)
29if [ ${BASEDIR:0:1} = "/" ]
30then
31 FULL_PATH=$BASEDIR
32else
33 FULL_PATH=$CURRENT_DIR/$BASEDIR
34fi
35LOGS_PROP_FILE=file:${FULL_PATH}/conf/log4j.properties
36CONF_FILE=${FULL_PATH}/conf/conf.yaml
37CREDENTIALS_FILE=${FULL_PATH}/conf/credentials.yaml
Stone, Avi (as206k)7db40ac2018-05-21 14:57:57 +030038MainClass=org.onap.dcae.ci.run.RunTestSuite
Stone, Avi (as206k)eaf57062018-04-12 15:57:26 +030039
40
41cmd="java -Dconfig.resource=${CONF_FILE} -Dcredentials.file=${CREDENTIALS_FILE} -Dlog4j.configuration=${LOGS_PROP_FILE} -DtestSuite=${SUITE_FILE} -cp $JAR_FILE ${MainClass} &"
42$cmd
43
44status=`echo $?`
45
46echo "##################################################"
47echo "################# status is ${status} #################"
48echo "##################################################"
49
50exit $status