From 51114ffb2312e06bd8d25d0bd8aeb38cf2181662 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Wed, 4 Feb 2015 15:56:52 -0500 Subject: [PATCH] Do not log skipped tests as failed Signed-off-by: Andrew Schoen --- teuthology/task/tests/__init__.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/teuthology/task/tests/__init__.py b/teuthology/task/tests/__init__.py index 661cc21fe3..8e27e59cf1 100644 --- a/teuthology/task/tests/__init__.py +++ b/teuthology/task/tests/__init__.py @@ -50,14 +50,19 @@ class TeuthologyContextPlugin(object): test_path = ".".join(test_path[4:-1]) # removes the string '[ctx0, config0]' after the test name test_name = item.location[2].split("[")[0] - msg = "{path}:{name}".format(path=test_path, name=test_name) + name = "{path}:{name}".format(path=test_path, name=test_name) if report.passed: - log.info("{msg} PASSED!".format(msg=msg)) + log.info("{name} Passed".format(name=name)) + elif report.skipped: + log.info("{name} {info}".format( + name=name, + info=call.excinfo.exconly() + )) else: - log.error("{msg} FAILED!".format(msg=msg)) - log.error("{msg} failed with: '{info}'".format( - msg=msg, - info=call.excinfo + # TODO: figure out a way to log the traceback + log.error("{name} Failed: {info}".format( + name=name, + info=call.excinfo.exconly() )) return report -- 2.39.5