diff --git a/lib/gdbcommand.py b/lib/gdbcommand.py index d4cdb9e..ab5a837 100644 --- a/lib/gdbcommand.py +++ b/lib/gdbcommand.py @@ -19,12 +19,16 @@ class CopyOldGDBSumFile (ShellCommand): def evaluateCommand (self, cmd): rev = self.getProperty('got_revision') builder = self.getProperty('buildername') - istry = self.getProperty('isTryBuilder') + istrybuilder = self.getProperty('isTryBuilder') + isrebuild = self.getProperty ('isRebuild') branch = self.getProperty('branch') wb = get_web_base () if branch is None: branch = 'master' + if (istrybuilder and istrybuilder == 'yes') or (isrebuild and isrebuild == 'yes'): + return SUCCESS + # Switch to the right branch inside the BUILDER repo switch_to_branch (builder, branch) diff --git a/lib/gdbgitdb.py b/lib/gdbgitdb.py index 2bbb4a7..424c4fe 100644 --- a/lib/gdbgitdb.py +++ b/lib/gdbgitdb.py @@ -102,18 +102,24 @@ class SaveGDBResults (ShellCommand): rev = self.getProperty ('got_revision') builder = self.getProperty ('buildername') istry = self.getProperty ('isTryBuilder') + isrebuild = self.getProperty ('isRebuild') branch = self.getProperty ('branch') repodir = os.path.join (get_web_base (), builder) full_tag = "%s-%s-%s" % (datetime.now ().strftime ("%Y%m%d-%H%M%S"), rev, branch) if branch is None: branch = 'master' - if istry and istry == 'yes': - # Do nothing - return SUCCESS repo = git.Repo.init (path = repodir) + if (istry and istry == 'yes') or (isrebuild and isrebuild == 'yes'): + # Do nothing + if branch in repo.heads: + # We have to clean the branch because otherwise this + # can confuse other builds + repo.git.execute (['git', 'checkout', '*']) + return SUCCESS + if 'master' not in repo.heads: with open (os.path.join (repodir, 'README'), 'w') as f: f.write ("git repo for GDB test results -- %s" % builder) diff --git a/master.cfg b/master.cfg index 9479a5c..e3ef3be 100644 --- a/master.cfg +++ b/master.cfg @@ -178,6 +178,8 @@ send to the gdb-testers mailing list.""" git_url = "http://gdb-build.sergiodj.net/cgit" branch = build.getSourceStamps ()[0].branch cur_change = build.getSourceStamps ()[0].changes[0] + properties = build.getProperties () + isrebuild = properties.getProperty ('isRebuild') # Sending the root message to gdb-testers. SendRootMessageGDBTesters (branch, cur_change) @@ -223,6 +225,8 @@ send to the gdb-testers mailing list.""" # Including the 'regressions' log. This is the 'diff' of what # went wrong. text += "\n" + if isrebuild and isrebuild == 'yes': + text += "\nWARNING: This was a REBUILD request! The previous build (build #%s) MAY NOT BE the ancestor of the current build!\n\n" % properties.getProperty ('buildnumber') found_regressions = False for log in build.getLogs (): st = log.getStep () @@ -266,7 +270,7 @@ send to the gdb-testers mailing list.""" 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\n*** Regressions against the baseline ***\n" text += "============================\n" text += log.getText () text += "============================\n"