示例#1
0
 def testStepDoneFailOverridesWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS, WARNINGS]
     b.result = WARNINGS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
示例#2
0
 def testStepDoneWarningsDontOverrideFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [FAILURE]
     b.result = FAILURE
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
示例#3
0
 def testStepDoneFail(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
示例#4
0
 def testStepDoneWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, WARNINGS)
示例#5
0
 def testStepDoneHaltOnFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = []
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.haltOnFailure = True
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, True)
     self.assertEqual(b.result, FAILURE)
示例#6
0
 def testStepDoneHaltOnFailureFlunkOnWarnings(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.flunkOnWarnings = True
     self.haltOnFailure = True
     terminate = b.stepDone(WARNINGS, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, FAILURE)
示例#7
0
 def testStepDoneWarnOnFailure(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [SUCCESS]
     b.result = SUCCESS
     b.remote = Mock()
     step = FakeBuildStep()
     step.warnOnFailure = True
     step.flunkOnFailure = False
     terminate = b.stepDone(FAILURE, step)
     self.assertEqual(terminate, False)
     self.assertEqual(b.result, WARNINGS)
示例#8
0
 def testStepDoneRetryOverridesAnythingElse(self):
     r = FakeRequest()
     b = Build([r])
     b.results = [RETRY]
     b.result = RETRY
     b.remote = Mock()
     step = FakeBuildStep()
     step.alwaysRun = True
     b.stepDone(WARNINGS, step)
     b.stepDone(FAILURE, step)
     b.stepDone(SUCCESS, step)
     terminate = b.stepDone(EXCEPTION, step)
     self.assertEqual(terminate, True)
     self.assertEqual(b.result, RETRY)