Fix doStepIf and hideStepIf on ComputeTryCount

This commit is contained in:
Sergio Durigan Junior 2017-09-05 10:15:41 -04:00
parent 005f813519
commit 5586d736fd

View file

@ -785,7 +785,7 @@ command must not make BuildBot halt on failure."""
class ComputeTryBuildCount (steps.BuildStep): class ComputeTryBuildCount (steps.BuildStep):
def run (self): def run (self):
istry = props.getProperty ('scheduler').startswith ('try') istry = self.getProperty ('scheduler').startswith ('try')
if not istry: if not istry:
count = 0 count = 0
@ -803,6 +803,8 @@ def scheduler_is_racy (step):
return step.getProperty ('scheduler').startswith ('racy') return step.getProperty ('scheduler').startswith ('racy')
def scheduler_is_try (step): def scheduler_is_try (step):
return step.getProperty ('scheduler').startswith ('try') return step.getProperty ('scheduler').startswith ('try')
def scheduler_is_not_try_hide (result, step):
return not scheduler_is_try (step)
def scheduler_is_racy_hide (result, step): def scheduler_is_racy_hide (result, step):
return scheduler_is_racy (step) return scheduler_is_racy (step)
def scheduler_is_racy_try_hide (result, step): def scheduler_is_racy_try_hide (result, step):
@ -929,7 +931,8 @@ The parameters of the class are:
self.addStep (CloneOrUpdateGDBRepo ()) self.addStep (CloneOrUpdateGDBRepo ())
# Set the count of the try build # Set the count of the try build
self.addStep (ComputeTryBuildCount (hideStepIf = scheduler_is_not_try)) self.addStep (ComputeTryBuildCount (doStepIf = scheduler_is_try,
hideStepIf = scheduler_is_not_try_hide))
if self.run_testsuite: if self.run_testsuite:
self.addStep (CopyOldGDBSumFile (doStepIf = scheduler_is_not_racy_try_do, self.addStep (CopyOldGDBSumFile (doStepIf = scheduler_is_not_racy_try_do,