Skip to content

Commit

Permalink
Test that check_latest_revisions skips bad builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
letitz committed Oct 1, 2024
1 parent 7b250a3 commit 6b95ecd
Showing 1 changed file with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,25 @@ def test_latest_revisions_all_crash(self):

self.assertIsNone(result)

def test_skip_latest_bad_builds(self):
"""Ensures that `check_latest_revisions` skips bad builds."""

def repros(revision):
if revision > 19:
return False, uworker_msg_pb2.Output(
error_type=uworker_msg_pb2.REGRESSION_BAD_BUILD_ERROR)

return True, None

self.reproduces_in_revision = repros

regression_task_output = uworker_msg_pb2.RegressionTaskOutput()
result = regression_task.check_latest_revisions(
self.testcase, '/a/b', 'job_name', self.revision_list, None,
regression_task_output)

self.assertIsNone(result)

def test_regressed_at_min_revision(self):
"""Ensures that `check_earliest_revisions` returns a result if we reproduce
in the earliest revision.
Expand Down

0 comments on commit 6b95ecd

Please sign in to comment.