Move daisy jobs of master branch to zte-pod3
[releng.git] / jjb / functest / functest-suite.sh
1 #!/bin/bash
2
3 container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
4 if [ -z $container_id ]; then
5     echo "Functest container not found"
6     exit 1
7 fi
8
9 global_ret_val=0
10
11 tests=($(echo $FUNCTEST_SUITE_NAME | tr "," "\n"))
12 for test in ${tests[@]}; do
13     if [ "$BRANCH" == 'master' ]; then
14         cmd="run_tests -t $test"
15     else
16         cmd="python /home/opnfv/repos/functest/functest/ci/run_tests.py -t $test"
17     fi
18     docker exec $container_id $cmd
19     let global_ret_val+=$?
20 done
21
22 ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value"
23 echo ${global_ret_val}>${ret_val_file}
24
25 exit 0