summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2017-02-23 07:31:28 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-23 07:31:28 +0000
commit88cd7e80f8413dee424b870b157ced56a7e9eab9 (patch)
tree3a7e0c612004ec37cc91d3b904f45598233c451b
parent2a1abd9aa9a2371cfa86d3e64ac1c81e3a835c31 (diff)
parent9f0f57dc8095e706eebe69c321f12c9a2176e169 (diff)
Merge "[Functest] Refactor Functest-suite job"
-rw-r--r--jjb/functest/functest-ci-jobs.yml2
-rwxr-xr-xjjb/functest/functest-suite.sh27
2 files changed, 13 insertions, 16 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 49901bea2..b3348c7e9 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -347,8 +347,6 @@
- 'functest-cleanup'
- 'set-functest-env'
- 'functest-suite'
- - 'functest-store-results'
- - 'functest-exit'
- builder:
name: functest-daily
diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh
index f28d3d037..228cc3da4 100755
--- a/jjb/functest/functest-suite.sh
+++ b/jjb/functest/functest-suite.sh
@@ -1,19 +1,18 @@
#!/bin/bash
-set -e
-echo "Functest: run $FUNCTEST_SUITE_NAME on branch $BRANCH"
-if [[ "$BRANCH" =~ 'brahmaputra' ]]; then
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
-elif [[ "$BRANCH" =~ 'colorado' ]]; then
- cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME"
-else
- cmd="functest testcase run $FUNCTEST_SUITE_NAME"
-fi
container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
-docker exec $container_id $cmd
+if [ -z $container_id ]; then
+ echo "Functest container not found"
+ exit 1
+fi
+
+global_ret_val=0
-ret_value=$?
-ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
-echo ${ret_value}>${ret_val_file}
+tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n"))
+for test in ${tests[@]}; do
+ cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test"
+ docker exec $container_id $cmd
+ let global_ret_val+=$?
+done
-exit 0
+exit $global_ret_val