From 3883923445f5d11e2939865e08438f10f18bc6a9 Mon Sep 17 00:00:00 2001 From: Morgan Richomme Date: Thu, 21 Jan 2016 17:29:09 +0100 Subject: Push ODL results to DB JIRA: FUNCTEST-57 Change-Id: I8e998382aff0cc60e82338c27d234abe6be5c505 Signed-off-by: Morgan Richomme --- docker/requirements.pip | 2 ++ docker/run_tests.sh | 10 ++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'docker') diff --git a/docker/requirements.pip b/docker/requirements.pip index 40e56b9b5..2389d60ac 100644 --- a/docker/requirements.pip +++ b/docker/requirements.pip @@ -23,3 +23,5 @@ robotframework-requests==0.3.8 robotframework-sshlibrary==2.1.1 configObj==5.0.6 Flask==0.10.1 +xmltodict==0.9.2 + diff --git a/docker/run_tests.sh b/docker/run_tests.sh index 6ae12b906..7cb06ab8e 100755 --- a/docker/run_tests.sh +++ b/docker/run_tests.sh @@ -86,10 +86,12 @@ function run_test(){ ODL_PORT=$odl_port ODL_IP=$odl_ip NEUTRON_IP=$neutron_ip USR_NAME=$usr_name PASS=$password \ ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh - # save ODL results - odl_logs="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/logs" - if [ -d ${odl_logs} ]; then - cp -Rf ${odl_logs} ${FUNCTEST_CONF_DIR}/ODL/ + # push results to the DB in case of CI + if [[ -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" ]]; then + odl_logs="/home/opnfv/functest/results/odl/logs/2" + odl_path="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI" + node_name=$(env | grep NODE_NAME | cut -f2 -d'=') + python ${odl_path}/odlreport2db.py -x ${odl_logs}/output.xml -i ${INSTALLER_TYPE} -p ${node_name} -s ${DEPLOY_SCENARIO} fi ;; "tempest") -- cgit 1.2.3-korg