X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Ffunctest-suite.sh;h=469a5772684e980631a79704c83d4229b5028d7b;hb=a75cb5270680135361eaf6354b693477a2dcb395;hp=df286569faf951b8ab5fca07c91a77fba3535f1e;hpb=372752d715c22885648fd2138a73f6717fe6a587;p=releng.git diff --git a/jjb/functest/functest-suite.sh b/jjb/functest/functest-suite.sh index df286569f..469a57726 100755 --- a/jjb/functest/functest-suite.sh +++ b/jjb/functest/functest-suite.sh @@ -1,14 +1,21 @@ #!/bin/bash -set -e - -branch=${GIT_BRANCH##*/} -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="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t $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_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" +echo ${global_ret_val}>${ret_val_file} + +exit 0