aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-fe/src/test/resources/CI/tests/runTests.sh
diff options
context:
space:
mode:
authorMichael Lando <ml636r@att.com>2017-02-19 10:28:42 +0200
committerMichael Lando <ml636r@att.com>2017-02-19 10:51:01 +0200
commit451a3400b76511393c62a444f588a4ed15f4a549 (patch)
treee4f5873a863d1d3e55618eab48b83262f874719d /catalog-fe/src/test/resources/CI/tests/runTests.sh
parent5abfe4e1fb5fae4bbd5fbc340519f52075aff3ff (diff)
Initial OpenECOMP SDC commit
Change-Id: I0924d5a6ae9cdc161ae17c68d3689a30d10f407b Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'catalog-fe/src/test/resources/CI/tests/runTests.sh')
-rw-r--r--catalog-fe/src/test/resources/CI/tests/runTests.sh90
1 files changed, 90 insertions, 0 deletions
diff --git a/catalog-fe/src/test/resources/CI/tests/runTests.sh b/catalog-fe/src/test/resources/CI/tests/runTests.sh
new file mode 100644
index 0000000000..3fc0d39897
--- /dev/null
+++ b/catalog-fe/src/test/resources/CI/tests/runTests.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+DEBUG=0
+
+function cdAndExit() {
+ cd - >> /dev/null
+ exit $1
+}
+
+function usage() {
+ echo "$0 <envronment file>"
+ exit 3
+}
+
+
+if [ $# -ne 1 ]
+then
+ usage
+fi
+
+envFile=$1
+
+echo $envFile
+
+source $envFile
+
+#source ./envCatalogBE.sh
+
+echo "******************************************"
+echo "********* CATALOG_FE_HOST $CATALOG_FE_HOST "
+echo "********* CATALOG_FE_PORT $CATALOG_FE_PORT "
+echo "********* CATALOG_BE_HOST $CATALOG_BE_HOST "
+echo "********* CATALOG_BE_PORT $CATALOG_BE_PORT "
+echo "******************************************"
+
+if [[ ${DEBUG} -eq 1 ]]
+then
+ read stam
+fi
+
+for folder in *
+do
+
+if [[ -d $folder && $folder != "env" ]]
+then
+
+echo "processing folder" $folder
+cd $folder
+
+commandResult=`./command`
+
+if [ $? -ne 0 ]
+then
+ echo "command $folder failed"
+ cdAndExit 2
+fi
+
+echo "command result is $commandResult"
+results=`cat results`
+
+echo "Going to match $commandResult with pattern $results"
+
+matchNumber=`echo $commandResult | grep -c "$results" `
+echo $matchNumber
+if [ $matchNumber -eq 1 ]
+then
+ echo "command $folder succeed."
+else
+ echo "command $folder failed. Going to exit"
+ cdAndExit 1
+
+fi
+
+echo "Finish processing folder $folder"
+echo "********************************************************"
+
+cd - >> /dev/null
+
+#if folder
+fi
+
+#loop on folder
+done
+
+echo "***************************************"
+echo "* SUCCESS ${envFile} *"
+echo "***************************************"
+
+
+