X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Ffunctest-suite.sh;h=469a5772684e980631a79704c83d4229b5028d7b;hb=2709b8acc38cd1b1f6f847300f80730636223907;hp=28d7e3d104575ee44d79dd427fcc29ceb053a986;hpb=d406fb03948296cdd02c7b93ffb9433ceb39d872;p=releng.git diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh index 28d7e3d10..469a57726 100755 --- a/jjb/functest/functest-suite.sh +++ b/jjb/functest/functest-suite.sh @@ -1,17 +1,21 @@ #!/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 + +tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n")) +for test in ${tests[@]}; do + cmd="run_tests -t $test" + docker exec $container_id $cmd + let global_ret_val+=$? +done -ret_value=$? +ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo ${global_ret_val}>${ret_val_file} -exit $ret_value +exit 0