]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
Do not log skipped tests as failed
authorAndrew Schoen <aschoen@redhat.com>
Wed, 4 Feb 2015 20:56:52 +0000 (15:56 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 5 Feb 2015 20:19:23 +0000 (14:19 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
teuthology/task/tests/__init__.py

index 661cc21fe30203e395172c9556b4ccf60cc09eae..8e27e59cf1c5e8469bc94a1dc9c270db3b3b6e7e 100644 (file)
@@ -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