aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-08-19 07:41:50 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-08-19 07:41:51 +0000
commit6ff8fb2c3d46eb484e4b689456327616901a842f (patch)
tree7ec098ca52496a1b5a443037c0f8853d1c7e9f5e
parent088baa5e6a83f292afd4eb8f34ce41caf4a4504e (diff)
parent447819bd807b963ea5fbeb14ac4f4ef97f55f0f1 (diff)
Merge "Remove useless odlreport2db args"
-rw-r--r--[-rwxr-xr-x]ci/exec_test.sh3
-rw-r--r--[-rwxr-xr-x]testcases/Controllers/ODL/odlreport2db.py36
2 files changed, 7 insertions, 32 deletions
diff --git a/ci/exec_test.sh b/ci/exec_test.sh
index 98d54f205..d7883307b 100755..100644
--- a/ci/exec_test.sh
+++ b/ci/exec_test.sh
@@ -93,8 +93,7 @@ function run_test(){
env | grep NODE_NAME > /dev/null; then
odl_logs="/home/opnfv/functest/results/odl/"
odl_path="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/"
- 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}
+ python ${odl_path}/odlreport2db.py -x ${odl_logs}/output.xml
fi
;;
"tempest_smoke_serial")
diff --git a/testcases/Controllers/ODL/odlreport2db.py b/testcases/Controllers/ODL/odlreport2db.py
index 368d26611..86f3c5c7e 100755..100644
--- a/testcases/Controllers/ODL/odlreport2db.py
+++ b/testcases/Controllers/ODL/odlreport2db.py
@@ -33,13 +33,8 @@ import functest.utils.functest_utils as functest_utils
def usage():
print """Usage:
- python odlreport2db.py --xml=<output.xml> --pod=<pod name>
- --installer=<installer> --database=<database url>
- --scenario=<scenario>
+ python odlreport2db.py --xml=<output.xml> --help
-x, --xml xml file generated by robot test
- -p, --pod POD name where the test come from
- -i, --installer
- -s, --scenario
-h, --help this message
"""
sys.exit(2)
@@ -80,32 +75,21 @@ def parse_suites(suites):
def main(argv):
- (xml_file, pod, installer, scenario) = None, None, None, None
+ xml_file = None
try:
opts, args = getopt.getopt(argv,
- 'x:p:i:s:h',
- ['xml=', 'pod=',
- 'installer=',
- 'scenario=',
- 'help'])
+ 'x:h',
+ ['xml=', 'help'])
except getopt.GetoptError:
usage()
for opt, arg in opts:
- if opt in ('-h', '--help'):
- usage()
- elif opt in ('-x', '--xml'):
+ if opt in ('-x', '--xml'):
xml_file = arg
- elif opt in ('-p', '--pod'):
- pod = arg
- elif opt in ('-i', '--installer'):
- installer = arg
- elif opt in ('-s', '--scenario'):
- scenario = arg
else:
usage()
- if not all(x is not None for x in (xml_file, pod, installer, scenario)):
+ if xml_file is None:
usage()
with open(xml_file, "r") as myfile:
@@ -120,17 +104,9 @@ def main(argv):
data['version'] = all_data['@generator']
data['test_project'] = "functest"
data['case_name'] = "odl"
- data['pod_name'] = pod
- data['installer'] = installer
json.dumps(data, indent=4, separators=(',', ': '))
- # example:
- # python odlreport2db.py -x ~/Pictures/Perso/odl/output3.xml
- # -i fuel
- # -p opnfv-jump-2
- # -s os-odl_l2-ha
-
# success criteria for ODL = 100% of tests OK
status = "FAIL"
# TODO as part of the tests are executed before in the bash