#!/bin/bash
set +e
-
-cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/run_tests.py -t all ${flags}"
+[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r"
+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