From bba18fb7121617b0bcffd9edc9ffc455a4b179a3 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Tue, 23 Dec 2014 23:50:41 -0500 Subject: [PATCH] Improving email message when testing failed (probably because of timeout) --- master.cfg | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/master.cfg b/master.cfg index 46034f8..715bbeb 100644 --- a/master.cfg +++ b/master.cfg @@ -146,10 +146,18 @@ send to the gdb-testers mailing list.""" # Including the 'regressions' log. This is the 'diff' of what # went wrong. text += "\n" + text += "============================\n" for log in build.getLogs (): - if log.getName () == 'regressions' and log.hasContents (): - text += log.getText () + if log.getName () == 'regressions': + if not log.hasContents (): + # If the 'regressions' log has no content, it probably + # means that the test failed because of a timeout or + # something. In this case, we just warn. + text += "<< TESTING FAILED (probably timeout) >>\nPlease check the logs on the web\n" + else: + text += log.getText () break + text += "============================\n" # Including the 'xfail' log. It is important to say which tests # we are ignoring.