Skip to content

Commit

Permalink
tests/manual: trim saved state
Browse files Browse the repository at this point in the history
The statefile that tracks the progress of a bisect will today have all
the builds from a given stream in it when really it only needs to keep
track of the range of builds between the known good and known bad
entries. Let's trim it to just that range of builds.
  • Loading branch information
dustymabe committed Feb 28, 2025
1 parent 07eedf5 commit 701a2cc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/manual/coreos-builds-bisect.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
# cosa kola run --build=$build ext.config.mynewtestiwrote

import argparse
import copy
import json
import os
import os.path
Expand Down Expand Up @@ -146,6 +147,18 @@ def initialize_builds_info(buildsjson, arch, badbuild, goodbuild):
info[badbuild]['heuristic'] = 'GIVEN'
info[goodbuild]['status'] = 'GOOD'
info[goodbuild]['heuristic'] = 'GIVEN'

# Trim the builds we're operating on in the info dict to just the
# range between the bad and good builds
in_range = False
for key, _ in copy.deepcopy(info).items():
if key == badbuild:
in_range = True
if not in_range:
info.pop(key)
if key == goodbuild:
in_range = False

return info


Expand Down

0 comments on commit 701a2cc

Please sign in to comment.