@@ -237,20 +237,21 @@ def create_test_report(msg, ecs_with_res, init_session_state, pr_nrs=None, gist_
237237 else :
238238 build_overview = ["#### Overview of tested easyconfigs (in order)" ]
239239 for (ec , ec_res ) in ecs_with_res :
240- test_log = ''
240+ additional_info = ''
241241 if ec_res .get ('success' , False ):
242242 test_result = 'SUCCESS'
243+ error_descr = ''
243244 else :
245+ test_result = 'FAIL'
244246 # compose test result string
245- test_result = 'FAIL '
246247 if 'err' in ec_res :
247248 if isinstance (ec_res ['err' ], EasyBuildError ):
248- test_result + = '(build issue)'
249+ error_descr = '(build issue)'
249250 else :
250- test_result + = '(unhandled exception: %s )' % ec_res ['err' ]
251- test_result += ec_res ['traceback' ]
251+ error_descr = '(unhandled exception: `%s` )' % ec_res ['err' ]
252+ additional_info = f"``` \n { ec_res ['traceback' ]} \n ```"
252253 else :
253- test_result + = '(unknown cause, not an exception?!)'
254+ error_descr = '(unknown cause, not an exception?!)'
254255
255256 # create gist for log file (if desired and available)
256257 if gist_log and 'log_file' in ec_res :
@@ -266,9 +267,12 @@ def create_test_report(msg, ecs_with_res, init_session_state, pr_nrs=None, gist_
266267
267268 fn = '%s_partial.log' % os .path .basename (ec ['spec' ])[:- 3 ]
268269 gist_url = create_gist (partial_log_txt , fn , descr = descr , github_user = github_user )
269- test_log = "(partial log available at %s)" % gist_url
270+ additional_info += f "(partial log available at { gist_url } )"
270271
271- build_overview .append (" * **%s** _%s_ %s" % (test_result , os .path .basename (ec ['spec' ]), test_log ))
272+ filename = os .path .basename (ec ['spec' ])
273+ if error_descr :
274+ error_descr = f"**{ error_descr } **" # Make bold if set
275+ build_overview .append (f" * **{ test_result } ** _{ filename } _ { error_descr } \n { additional_info } " )
272276 build_overview .append ("" )
273277 test_report .extend (build_overview )
274278
0 commit comments