Change-Id: I472a41e3c2ad41e97a6f4ea3b82d72df73c8416b
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
set +e
[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
-cmd="run_tests -t all ${flags}"
+if [ "$BRANCH" == 'master' ]; then
+ cmd="run_tests -t all ${flags}"
+else
+ cmd="python ${FUNCTEST_REPO_DIR}/functest/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
tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n"))
for test in ${tests[@]}; do
- cmd="run_tests -t $test"
+ if [ "$BRANCH" == 'master' ]; then
+ cmd="run_tests -t $test"
+ else
+ cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test"
+ fi
docker exec $container_id $cmd
let global_ret_val+=$?
done
exit 1
fi
-cmd="prepare_env start"
+if [ "$BRANCH" == 'master' ]; then
+ cmd="prepare_env start"
+else
+ cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start"
+fi
+
echo "Executing command inside the docker: ${cmd}"
docker exec ${container_id} ${cmd}