Beispiel #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)
Beispiel #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)
Beispiel #3
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)
Beispiel #4
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)
 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)
 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)
 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)
 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)
Beispiel #9
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)
Beispiel #10
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)
Beispiel #11
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)
Beispiel #12
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)
Beispiel #13
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)
Beispiel #14
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)
Beispiel #15
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)
Beispiel #16
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)