From 1198ca990048196f0d0372eb21479fe29a736d9b Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Fri, 29 Apr 2016 18:35:10 +0200 Subject: Functest, Fix call to run_tests.py and change if condition for stable branch Change-Id: I9d4eb0079507014e37f8ad569af541b9d0121f7a Signed-off-by: jose.lausuch --- jjb/functest/functest-ci-jobs.yml | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'jjb') diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml index 2b2897471..8ee8d63d4 100644 --- a/jjb/functest/functest-ci-jobs.yml +++ b/jjb/functest/functest-ci-jobs.yml @@ -222,11 +222,10 @@ #!/bin/bash set -e echo "Functest: run $FUNCTEST_SUITE_NAME" - branch=${GIT_BRANCH##*/} - if [[ "${branch}" == "master" ]]; then - cmd="${FUNCTEST_REPO_DIR}/ci/run_tests.py -t $FUNCTEST_SUITE_NAME" - else: + if [[ ${branch} == *"stable"* ]]; then cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME" + else: + cmd="python ${FUNCTEST_REPO_DIR}/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 @@ -237,12 +236,11 @@ - shell: | #!/bin/bash set +e - branch=${GIT_BRANCH##*/} [[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" - if [[ "${branch}" == "master" ]]; then - cmd="${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" - else: + if [[ ${branch} == *"stable"* ]]; then cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${flags}" + else: + cmd="python ${FUNCTEST_REPO_DIR}/ci/run_tests.py -t all ${flags}" fi container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) docker exec $container_id $cmd @@ -315,10 +313,10 @@ echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..." exit 1 fi - if [[ "${branch}" == "master" ]]; then - cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start" - else: + if [[ ${branch} == *"stable"* ]]; then cmd="${FUNCTEST_REPO_DIR}/docker/prepare_env.sh" + else: + cmd="python ${FUNCTEST_REPO_DIR}/ci/prepare_env.py start" fi echo "Executing command inside the docker: ${cmd}" docker exec ${container_id} ${cmd} -- cgit 1.2.3-korg