summaryrefslogtreecommitdiffstats
path: root/jjb/functest/functest-loop.sh
blob: ab97c35790576c6af6ae113e34fd7b79bcabf16d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
set +e

branch=${GIT_BRANCH##*/}
[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
if [[ ${branch} == *"brahmaputra"* ]]; then
    cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh -s ${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

ret_value=$?
ret_val_file="${HOME}/opnfv/functest/results/${branch}/return_value"
echo ${ret_value}>${ret_val_file}

exit 0