Fix write_sum_file/write_try_build_sum_file "confusion" when building the first commit of the builder/branch.

This commit is contained in:
Sergio Durigan Junior 2017-10-02 09:17:35 -04:00
parent a89211046c
commit 23ab40ab3f
2 changed files with 13 additions and 4 deletions

View file

@ -87,7 +87,11 @@ class GdbCatSumfileCommand(steps.ShellCommand):
if not os.path.exists (db_file): if not os.path.exists (db_file):
# This takes care of our very first build. # This takes care of our very first build.
parser.write_sum_file (cur_results, builder, branch, rev, istry) if istry:
parser.write_try_build_sum_file (cur_results, builder, branch,
rev, 0)
else:
parser.write_sum_file (cur_results, builder, branch, rev, istry)
# If there was no previous baseline, then this run # If there was no previous baseline, then this run
# gets the honor. # gets the honor.
if baseline is None: if baseline is None:
@ -105,7 +109,11 @@ class GdbCatSumfileCommand(steps.ShellCommand):
prevcommit = prev[0] prevcommit = prev[0]
else: else:
# This takes care of our very first build. # This takes care of our very first build.
parser.write_sum_file (cur_results, builder, branch, rev, istry) if istry:
parser.write_try_build_sum_file (cur_results, builder, branch,
rev, 0)
else:
parser.write_sum_file (cur_results, builder, branch, rev, istry)
# If there was no previous baseline, then this run # If there was no previous baseline, then this run
# gets the honor. # gets the honor.
if baseline is None: if baseline is None:

View file

@ -95,9 +95,10 @@ class DejaResults(object):
f.write (sum_dict[0][k] + ': ' + k + '\n') f.write (sum_dict[0][k] + ': ' + k + '\n')
os.umask (old_umask) os.umask (old_umask)
def write_sum_file(self, sum_dict, builder, branch, rev, istry): def write_sum_file(self, sum_dict, builder, branch, rev, istry, try_count = 0):
if istry: if istry:
self.write_try_build_sum_file (self, sum_dict, builder, branch, rev) self.write_try_build_sum_file (self, sum_dict, builder, branch, rev,
try_count = try_count)
else: else:
self._write_sum_file (sum_dict, builder, rev, 'gdb.sum', istry = False, self._write_sum_file (sum_dict, builder, rev, 'gdb.sum', istry = False,
branch = branch) branch = branch)