summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--jjb/functest/functest-ci-jobs.yml9
-rw-r--r--jjb/functest/functest-exit.sh12
-rwxr-xr-xjjb/functest/functest-loop.sh6
3 files changed, 27 insertions, 0 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 8e3de3d75..3070c2535 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -276,6 +276,7 @@
- 'set-functest-env'
- 'functest-daily'
- 'functest-store-results'
+ - 'functest-exit'
- builder:
name: functest-weekly-builder
@@ -284,6 +285,7 @@
- 'set-functest-env'
- 'functest-weekly'
- 'functest-store-results'
+ - 'functest-exit'
- builder:
name: functest-suite-builder
@@ -291,6 +293,7 @@
- 'functest-cleanup'
- 'set-functest-env'
- 'functest-suite'
+ - 'functest-exit'
- builder:
name: functest-daily
@@ -327,3 +330,9 @@
builders:
- shell:
!include-raw: ./functest-cleanup.sh
+
+- builder:
+ name: functest-exit
+ builders:
+ - shell:
+ !include-raw: ./functest-exit.sh \ No newline at end of file
diff --git a/jjb/functest/functest-exit.sh b/jjb/functest/functest-exit.sh
new file mode 100644
index 000000000..f2aa2d032
--- /dev/null
+++ b/jjb/functest/functest-exit.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+branch=${GIT_BRANCH##*/}
+ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value"
+if [ ! -f ${ret_val_file} ]; then
+ echo "Return value not found!"
+ exit -1
+fi
+
+ret_val=`cat ${ret_val_file}`
+
+exit ret_val \ No newline at end of file
diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh
index 5abddfd84..73856235f 100755
--- a/jjb/functest/functest-loop.sh
+++ b/jjb/functest/functest-loop.sh
@@ -10,3 +10,9 @@ else
fi
container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
docker exec $container_id $cmd
+
+ret_value=$?
+ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value"
+echo ${ret_value}>${ret_val_file}
+
+exit 0 \ No newline at end of file