aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/rally
diff options
context:
space:
mode:
Diffstat (limited to 'functest/opnfv_tests/openstack/rally')
-rwxr-xr-xfunctest/opnfv_tests/openstack/rally/run_rally-cert.py37
1 files changed, 16 insertions, 21 deletions
diff --git a/functest/opnfv_tests/openstack/rally/run_rally-cert.py b/functest/opnfv_tests/openstack/rally/run_rally-cert.py
index ec22b52d..b02fd427 100755
--- a/functest/opnfv_tests/openstack/rally/run_rally-cert.py
+++ b/functest/opnfv_tests/openstack/rally/run_rally-cert.py
@@ -1,19 +1,12 @@
-#!/usr/bin/env python
+#!/usr/bin/python
#
-# Copyright (c) 2015 Orange
-# guyrodrigue.koffi@orange.com
-# morgan.richomme@orange.com
-# All rights reserved. This program and the accompanying materials
+# Copyright (c) 2015 All rights reserved
+# This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
#
-# 0.1 (05/2015) initial commit
-# 0.2 (28/09/2015) extract Tempest, format json result, add ceilometer suite
-# 0.3 (19/10/2015) remove Tempest from run_rally
-# and push result into test DB
+# http://www.apache.org/licenses/LICENSE-2.0
#
-""" tests configuration """
import argparse
import json
@@ -391,10 +384,11 @@ def run_task(test_name):
logger.info('No tests for scenario "{}"'.format(test_name))
return
- cmd_line = ("rally task start --abort-on-sla-failure " +
- "--task {} ".format(task_file) +
- "--task-args \"{}\" ".format(build_task_args(test_name)))
- logger.debug('running command line : {}'.format(cmd_line))
+ cmd_line = ("rally task start --abort-on-sla-failure "
+ "--task {0} "
+ "--task-args \"{1}\""
+ .format(task_file, build_task_args(test_name)))
+ logger.debug('running command line: {}'.format(cmd_line))
p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE,
stderr=RALLY_STDERR, shell=True)
@@ -404,10 +398,11 @@ def run_task(test_name):
if task_id is None:
logger.error('Failed to retrieve task_id, validating task...')
- cmd_line = ("rally task validate " +
- "--task {} ".format(task_file) +
- "--task-args \"{}\" ".format(build_task_args(test_name)))
- logger.debug('running command line : {}'.format(cmd_line))
+ cmd_line = ("rally task validate "
+ "--task {0} "
+ "--task-args \"{1}\""
+ .format(task_file, build_task_args(test_name)))
+ logger.debug('running command line: {}'.format(cmd_line))
p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, shell=True)
output = get_cmd_output(p)
@@ -425,12 +420,12 @@ def run_task(test_name):
cmd_line = "rally task report {} --out {}".format(task_id,
report_html_dir)
- logger.debug('running command line : {}'.format(cmd_line))
+ logger.debug('running command line: {}'.format(cmd_line))
os.popen(cmd_line)
# get and save rally operation JSON result
cmd_line = "rally task results %s" % task_id
- logger.debug('running command line : {}'.format(cmd_line))
+ logger.debug('running command line: {}'.format(cmd_line))
cmd = os.popen(cmd_line)
json_results = cmd.read()
report_json_name = 'opnfv-{}.json'.format(test_name)