aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorchenjiankun <chenjiankun1@huawei.com>2017-08-14 03:09:36 +0000
committerchenjiankun <chenjiankun1@huawei.com>2017-09-11 07:01:37 +0000
commit74561e3250400332a404f4d53acc3e1db8ed9b6e (patch)
tree0164e59e46b2543f9c5671289b91fa2803ab943d
parent1857c4f37c9d371ddd48eb4d97a379c7c81c18e7 (diff)
Log each test case status in a task
JIRA: YARDSTICK-785 Currently if one test case failed, we will log error. But if one case success, we do not have any tips. We need log success when one case success. Change-Id: I0f41ac55f2569f44b787133e3f2594a5c5547f4a Signed-off-by: chenjiankun <chenjiankun1@huawei.com>
-rw-r--r--yardstick/benchmark/core/task.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py
index dd35bd4f4..9e1896888 100644
--- a/yardstick/benchmark/core/task.py
+++ b/yardstick/benchmark/core/task.py
@@ -126,9 +126,10 @@ class Task(object): # pragma: no cover
except KeyboardInterrupt:
raise
except Exception:
- LOG.exception("Running test case %s failed!", case_name)
+ LOG.error('Testcase: "%s" FAILED!!!', case_name, exe_info=True)
testcases[case_name] = {'criteria': 'FAIL', 'tc_data': []}
else:
+ LOG.info('Testcase: "%s" SUCCESS!!!', case_name)
testcases[case_name] = {'criteria': 'PASS', 'tc_data': data}
if args.keep_deploy:
@@ -265,7 +266,9 @@ class Task(object): # pragma: no cover
runner = self.run_one_scenario(scenario, output_file)
status = runner_join(runner)
if status != 0:
- LOG.error('Scenario: %s ERROR', scenario.get('type'))
+ LOG.error('Scenario NO.%s: "%s" ERROR!',
+ scenarios.index(scenario) + 1,
+ scenario.get('type'))
raise RuntimeError
self.outputs.update(runner.get_output())
result.extend(runner.get_result())