aboutsummaryrefslogtreecommitdiffstats
path: root/csit/run-project-csit.sh
diff options
context:
space:
mode:
Diffstat (limited to 'csit/run-project-csit.sh')
-rwxr-xr-xcsit/run-project-csit.sh59
1 files changed, 31 insertions, 28 deletions
diff --git a/csit/run-project-csit.sh b/csit/run-project-csit.sh
index f09af486..b5ddc8ed 100755
--- a/csit/run-project-csit.sh
+++ b/csit/run-project-csit.sh
@@ -51,16 +51,23 @@ function on_exit(){
trap on_exit EXIT
function docker_stats(){
- #General memory details
- echo "> top -bn1 | head -3"
- top -bn1 | head -3
- echo
-
- echo "> free -h"
- free -h
- echo
+ # General memory details
+ if [ "$(uname -s)" == "Darwin" ]
+ then
+ echo "> top -l1 | head -10"
+ sh -c "top -l1 | head -10"
+ echo
+ else
+ echo "> top -bn1 | head -3"
+ sh -c "top -bn1 | head -3"
+ echo
+
+ echo "> free -h"
+ sh -c "free -h"
+ echo
+ fi
- #Memory details per Docker
+ # Memory details per Docker
echo "> docker ps"
docker ps
echo
@@ -120,6 +127,19 @@ function source_safely() {
# main
#
+if $(docker images | grep -q "onap\/policy-api")
+then
+ echo where
+ export CONTAINER_LOCATION=$(
+ docker images |
+ grep onap/policy-api |
+ head -1 |
+ sed 's/onap\/policy-api.*$//'
+ )
+else
+ export CONTAINER_LOCATION="nexus3.onap.org:10001/"
+fi
+
# set and save options for quick failure
harden_set && save_set
@@ -145,10 +165,6 @@ export ROBOT_VARIABLES=
# get the plan from git clone
source "${SCRIPTS}"/get-branch.sh
-# Prepare configuration files
-cd "${WORKSPACE}/csit"
-python3 ./prepare-config-files.py --https=true
-
export PROJECT="${1}"
cd ${WORKSPACE}
@@ -165,25 +181,12 @@ source_safely "${SCRIPTS}/prepare-csit.sh"
# Activate the virtualenv containing all the required libraries installed by prepare-csit.sh
source_safely "${ROBOT_VENV}/bin/activate"
-WORKDIR=$(mktemp -d --suffix=-robot-workdir)
+WORKDIR=$(mktemp -d)
cd "${WORKDIR}"
# Sign in to nexus3 docker repo
docker login -u docker -p docker nexus3.onap.org:10001
-# Generate truststore and keystore to be used by repos
-${SCRIPTS}/gen_truststore.sh
-${SCRIPTS}/gen_keystore.sh
-cp ${SCRIPTS}/config/ks.jks ${SCRIPTS}/config/drools/custom/policy-keystore
-cp ${SCRIPTS}/config/ks.jks ${SCRIPTS}/config/drools-apps/custom/policy-keystore
-cp ${SCRIPTS}/config/policy-truststore \
- ${SCRIPTS}/config/drools/custom/policy-truststore
-cp ${SCRIPTS}/config/policy-truststore \
- ${SCRIPTS}/config/drools-apps/custom/policy-truststore
-chmod 644 \
- ${SCRIPTS}/config/drools/custom/policy-* \
- ${SCRIPTS}/config/drools-apps/custom/policy-*
-
# Run setup script plan if it exists
cd "${TESTPLANDIR}/plans/"
SETUP="${TESTPLANDIR}/plans/setup.sh"
@@ -200,7 +203,7 @@ cd "${WORKDIR}"
echo "Reading the testplan:"
cat "${TESTPLANDIR}/plans/testplan.txt" | egrep -v '(^[[:space:]]*#|^[[:space:]]*$)' | sed "s|^|${TESTPLANDIR}/tests/|" > testplan.txt
cat testplan.txt
-SUITES=$( xargs -a testplan.txt )
+SUITES=$( xargs < testplan.txt )
echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
echo "Starting Robot test suites ${SUITES} ..."