Print unittest description in case it's available

This commit is contained in:
Pim van Pelt
2022-03-13 19:58:17 +00:00
parent 763c1ca74c
commit ec93195832

View File

@ -94,7 +94,10 @@ def main():
logging.error("Unexpected message: %s" % (m)) logging.error("Unexpected message: %s" % (m))
this_failed = True this_failed = True
if this_failed: if this_failed:
logging.error("Unittest %s failed" % (fn)) if 'test' in unittest and 'description' in unittest['test']:
logging.error("Unittest %s failed: %s" % (fn, unittest['test']['description']))
else:
logging.error("Unittest %s failed" % (fn))
errors = errors + 1 errors = errors + 1
else: else:
logging.info("Unittest %s passed" % (fn)) logging.info("Unittest %s passed" % (fn))