From d8f6a87dc766f45db29fceb9b4e2239636fbef8c Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Wed, 4 Feb 2015 23:29:25 -0500 Subject: [PATCH] Improving email report --- master.cfg | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/master.cfg b/master.cfg index 2313ead..985a4d6 100644 --- a/master.cfg +++ b/master.cfg @@ -179,13 +179,14 @@ send to the gdb-testers mailing list.""" # Including the 'regressions' log. This is the 'diff' of what # went wrong. text += "\n" - print_xfail = False + found_regressions = False for log in build.getLogs (): st = log.getStep () if st.getResults ()[0] == FAILURE: n = st.getName () if n == 'update gdb master repo': text += "*** Failed to update master GDB git repository. The build can continue. ***\n\n" + continue elif n == 'update gdb repo': text += "*** Failed to update GDB git repository. This is probably a timeout problem. ***\n\n" break @@ -213,18 +214,27 @@ send to the gdb-testers mailing list.""" text += "============================\n" text += log.getText () text += "============================\n" - print_xfail = True + found_regressions = True break # Including the 'xfail' log. It is important to say which tests # we are ignoring. - if print_xfail: + if found_regressions: + for log in build.getLogs (): + if log.getStep ().getName () == 'regressions' and log.getName () == 'baseline_diff': + text += "\n\n*** Also, the following failures have been found when comparing to the baseline ***\n" + text += "============================\n" + text += log.getText () + text += "============================\n" + break + xfail = os.path.join (gdb_web_base, name, 'xfails', branch, 'xfail') if os.path.exists (xfail): - text += "\n" - text += "Failures that are being ignored:\n\n" + text += "\n\n***Failures that are being ignored:\n" + text += "============================\n" with open (xfail, 'r') as f: text += f.read () + text += "============================\n" text += "\n" return { 'body' : text, 'type' : 'plain',