Taking care of try builds when writing sum files
This commit is contained in:
parent
630197c09f
commit
d7e4296d8e
2 changed files with 21 additions and 14 deletions
|
@ -68,6 +68,7 @@ class GdbCatSumfileCommand(steps.ShellCommand):
|
||||||
rev = self.getProperty('got_revision')
|
rev = self.getProperty('got_revision')
|
||||||
builder = self.getProperty('buildername')
|
builder = self.getProperty('buildername')
|
||||||
istrysched = self.getProperty('isTrySched')
|
istrysched = self.getProperty('isTrySched')
|
||||||
|
istry = istrysched and istrysched == 'yes'
|
||||||
branch = self.getProperty('branch')
|
branch = self.getProperty('branch')
|
||||||
db_file = os.path.join (get_web_base (), builder, builder + '.db')
|
db_file = os.path.join (get_web_base (), builder, builder + '.db')
|
||||||
parser = DejaResults()
|
parser = DejaResults()
|
||||||
|
@ -79,12 +80,12 @@ 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)
|
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:
|
||||||
baseline = cur_results
|
baseline = cur_results
|
||||||
parser.write_baseline (baseline, builder, branch, rev)
|
parser.write_baseline (baseline, builder, branch, rev, istry)
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
|
|
||||||
con = sqlite3.connect (db_file)
|
con = sqlite3.connect (db_file)
|
||||||
|
@ -97,12 +98,12 @@ 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)
|
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:
|
||||||
baseline = cur_results
|
baseline = cur_results
|
||||||
parser.write_baseline (baseline, builder, branch, rev)
|
parser.write_baseline (baseline, builder, branch, rev, istry)
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
|
|
||||||
baseline = parser.read_baseline (builder, branch, prevcommit)
|
baseline = parser.read_baseline (builder, branch, prevcommit)
|
||||||
|
@ -123,14 +124,14 @@ class GdbCatSumfileCommand(steps.ShellCommand):
|
||||||
self.addCompleteLog ('regressions', report)
|
self.addCompleteLog ('regressions', report)
|
||||||
result = FAILURE
|
result = FAILURE
|
||||||
|
|
||||||
if istrysched and istrysched == 'yes':
|
if istry:
|
||||||
parser.write_try_build_sum_file (cur_results, builder, branch, rev)
|
parser.write_try_build_sum_file (cur_results, builder, branch, rev)
|
||||||
else:
|
else:
|
||||||
parser.write_sum_file (cur_results, builder, branch, rev)
|
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:
|
||||||
baseline = cur_results
|
baseline = cur_results
|
||||||
parser.write_baseline (baseline, builder, branch, rev)
|
parser.write_baseline (baseline, builder, branch, rev, istry)
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
|
@ -69,10 +69,14 @@ class DejaResults(object):
|
||||||
# and to the set.
|
# and to the set.
|
||||||
out_dict[1][result].add (test_name)
|
out_dict[1][result].add (test_name)
|
||||||
|
|
||||||
def _write_sum_file(self, sum_dict, builder, rev, filename, header = None):
|
def _write_sum_file(self, sum_dict, builder, rev, filename, header = None, istry):
|
||||||
global gdb_web_base
|
global gdb_web_base
|
||||||
|
|
||||||
|
if istry:
|
||||||
|
bdir = os.path.join (gdb_web_base, builder, 'try', rev[:2], rev)
|
||||||
|
else:
|
||||||
bdir = os.path.join (gdb_web_base, builder, rev[:2], rev)
|
bdir = os.path.join (gdb_web_base, builder, rev[:2], rev)
|
||||||
|
|
||||||
if not os.path.exists (bdir):
|
if not os.path.exists (bdir):
|
||||||
old_umask = os.umask (0022)
|
old_umask = os.umask (0022)
|
||||||
os.makedirs (bdir)
|
os.makedirs (bdir)
|
||||||
|
@ -90,16 +94,18 @@ 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):
|
def write_sum_file(self, sum_dict, builder, branch, rev, istry):
|
||||||
self._write_sum_file (sum_dict, builder, rev, 'gdb.sum')
|
self._write_sum_file (sum_dict, builder, rev, 'gdb.sum', istry = istry)
|
||||||
|
|
||||||
def write_try_build_sum_file (self, sum_dict, builder, branch, rev):
|
def write_try_build_sum_file (self, sum_dict, builder, branch, rev):
|
||||||
self._write_sum_file (sum_dict, builder, rev, 'trybuild_gdb.sum',
|
self._write_sum_file (sum_dict, builder, rev, 'trybuild_gdb.sum',
|
||||||
header = "### THIS SUM FILE WAS GENERATED BY A TRY BUILD ###\n\n")
|
header = "### THIS SUM FILE WAS GENERATED BY A TRY BUILD ###\n\n",
|
||||||
|
istry = True)
|
||||||
|
|
||||||
def write_baseline(self, sum_dict, builder, branch, rev):
|
def write_baseline(self, sum_dict, builder, branch, rev, istry):
|
||||||
self._write_sum_file(sum_dict, builder, rev, 'baseline',
|
self._write_sum_file(sum_dict, builder, rev, 'baseline',
|
||||||
header = "### THIS BASELINE WAS LAST UPDATED BY COMMIT %s ###\n\n" % rev)
|
header = "### THIS BASELINE WAS LAST UPDATED BY COMMIT %s ###\n\n" % rev,
|
||||||
|
istry = istry)
|
||||||
|
|
||||||
# Read a .sum file.
|
# Read a .sum file.
|
||||||
# The builder name is BUILDER.
|
# The builder name is BUILDER.
|
||||||
|
|
Loading…
Reference in a new issue