Merge "Enable daisy euphrates jobs of daily and functest"
[releng.git] / jjb / functest / functest-loop.sh
index 869c395..00a5f13 100755 (executable)
@@ -1,8 +1,12 @@
 #!/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