aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/VIM/OpenStack/CI
diff options
context:
space:
mode:
authorMorgan Richomme <morgan.richomme@orange.com>2016-01-28 07:47:13 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-28 07:47:13 +0000
commit2691ab1627a7e0ed7cb87b6fef5772823a27b59b (patch)
treebf93af2d8946185a4f089f44184dfbb17d92238e /testcases/VIM/OpenStack/CI
parente1e2cf3216a37341684c4dc7fd92c6e154f355e9 (diff)
parentb0365d10fda5018721d012602077dddda948a6d9 (diff)
Merge "Reduce Rally output"
Diffstat (limited to 'testcases/VIM/OpenStack/CI')
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally-cert.py25
1 files changed, 18 insertions, 7 deletions
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
index a0304519b..d2ac62ac1 100755
--- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
@@ -221,10 +221,22 @@ def run_task(test_name):
p = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=RALLY_STDERR, shell=True)
result = ""
while p.poll() is None:
- l = p.stdout.readline()
- print l.replace('\n', '')
- result += l
-
+ #l = p.stdout.readline()
+ #line = l.replace('\n', '')
+ line = p.stdout.readline()
+ if "Load duration" in line or \
+ "started" in line or \
+ "finished" in line or \
+ " Preparing" in line or \
+ "+-" in line or \
+ "|" in line:
+ result += line
+ elif "test scenario" in line:
+ result += "\n" + line
+ elif "Full duration" in line:
+ result += line + "\n\n"
+
+ logger.info("\n" + result)
task_id = get_task_id(result)
logger.debug('task_id : {}'.format(task_id))
@@ -265,9 +277,9 @@ def run_task(test_name):
""" parse JSON operation result """
if task_succeed(json_results):
- print 'Test OK'
+ logger.info("Test OK.")
else:
- print 'Test KO'
+ logger.info("Test Failed.")
def main():
@@ -329,7 +341,6 @@ def main():
for test_name in tests:
if not (test_name == 'all' or
test_name == 'vm'):
- print(test_name)
run_task(test_name)
else:
print(args.test_name)