summaryrefslogtreecommitdiffstats
path: root/gather_data.sh
diff options
context:
space:
mode:
authorJerry Flood <jf9860@att.com>2017-03-22 15:30:25 -0400
committerJerry Flood <jf9860@att.com>2017-03-22 15:30:45 -0400
commit4345ded819aa66219e21377550e0ae3c6e9534ac (patch)
tree6f7d33481807545d58b06c952dd64592c6c53e18 /gather_data.sh
parentf67ce0e39027a92c99c7cca39b5a7d5e32dd17fa (diff)
TEST-6 Support gather data listener
Add gather_data_sh and support for EteDataGatherListener into runTags.sh Change-Id: Id161d74ac4ed90c01716d9f8f3ddfd431614f5ba Signed-off-by: Jerry Flood <jf9860@att.com>
Diffstat (limited to 'gather_data.sh')
-rw-r--r--gather_data.sh36
1 files changed, 36 insertions, 0 deletions
diff --git a/gather_data.sh b/gather_data.sh
new file mode 100644
index 00000000..ad14ac33
--- /dev/null
+++ b/gather_data.sh
@@ -0,0 +1,36 @@
+#!/bin/bash
+##################################################################################################
+# This shell is designed to support retrieval of application debugging data in the case of
+# an ETE test failure. This script, along with the gather_application_data.sh will be installed
+# in /opt on each of the ONAP VMs. The gather_application_data function is designed by each
+# application to gather the relevant debugging data into the current working directory
+# to be zipped up and transferred to the Robot VM and ultimately, posted in the failed Jenkins
+# job.
+##################################################################################################
+
+JOB_NUMBER=$2
+APPLICATION=$1
+if [ "$JOB_NUMBER" == '' ];then
+ JOB_NUMBER=0
+fi
+if [ "$APPLICATION" == '' ];then
+ APPLICATION='job'
+fi
+
+if [ -e /opt/gather_application_data.sh ]; then
+ source /opt/gather_application_data.sh
+else
+ >&2 echo "${APPLICATION} No gather_application_data function"
+ exit
+fi
+
+
+FOLDER=/tmp/gather_data/${APPLICATION}_${JOB_NUMBER}
+mkdir -p $FOLDER
+
+cd ${FOLDER}
+
+gather_application_data
+
+cd ../
+tar --remove-files -cvzf ${APPLICATION}_${JOB_NUMBER}.tar.gz ${APPLICATION}_${JOB_NUMBER}