summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-12-14 16:46:17 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2015-12-14 17:53:08 +0100
commit49de5cbe3ab12981ef81ac3df507d39681ecc929 (patch)
tree544dc1fc94c9692e0eb269a98879db703cca3dad /jjb/functest
parent785ce4c9930e67b5ddcd19bb7ce3a30188f510fa (diff)
Add flag in functest tests to force pushing the results to the DB
JIRA: FUNCTEST-84 NOTE: This depends on this patch https://gerrit.opnfv.org/gerrit/#/c/4455/1 By default, it will not push anything unless we specify it with "-r" flag We want to push every time we run Functest from Jenkins, but not when a random OPNFV user runs the tests. Change-Id: I1e35cb9c91b24bd241b327a4a3c42c068bbfc685 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'jjb/functest')
-rw-r--r--jjb/functest/functest.yml18
1 files changed, 14 insertions, 4 deletions
diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml
index c45fdb2c0..c77a1fac9 100644
--- a/jjb/functest/functest.yml
+++ b/jjb/functest/functest.yml
@@ -132,6 +132,10 @@
name: FUNCTEST_REPO_DIR
default: "/home/opnfv/repos/functest"
description: "Directory where the Functest repository is cloned"
+ - string:
+ name: PUSH_RESULTS_TO_DB
+ default: "true"
+ description: "Push the results of all the tests to the resultDB"
########################
# trigger macros
########################
@@ -156,9 +160,12 @@
- shell: |
#!/bin/bash
set +e
-
+ flag=""
+ if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then
+ flag="-r"
+ fi
echo "Functest: run $FUNCTEST_SUITE_NAME"
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME"
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh --test $FUNCTEST_SUITE_NAME ${flag}"
container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
docker exec $container_id $cmd
@@ -168,9 +175,12 @@
- shell: |
#!/bin/bash
set +e
-
+ flag=""
+ if [ "${PUSH_RESULTS_TO_DB}" == "true" ]; then
+ flag="-r"
+ fi
echo "Functest: running all the tests"
- cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh"
+ cmd="${FUNCTEST_REPO_DIR}/docker/run_tests.sh ${flag}"
container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1)
docker exec $container_id $cmd