Skip to content

Commit

Permalink
hudson: test: Prevent duplicates in build targets / devices.json
Browse files Browse the repository at this point in the history
Change-Id: I8772d66c4163c92edff8f0403618836acedc9d3e
  • Loading branch information
luk1337 committed Dec 25, 2024
1 parent 8d2b780 commit f6a37f7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ def test_build_targets(self):

with open("updater/devices.json", "r") as f:
for device in json.load(f):
self.assertFalse(
device["model"] in models_json,
f"Duplicate model in devices.json: {device['model']}",
)
models_json.add(device["model"])

models_hudson = set()
Expand All @@ -22,6 +26,11 @@ def test_build_targets(self):
continue

model, _, _, _ = line.split()

self.assertFalse(
model in models_hudson,
f"Duplicate model in lineage-build-targets: {model}",
)
models_hudson.add(model)

models_missing = models_hudson - models_json
Expand Down

0 comments on commit f6a37f7

Please sign in to comment.