From f6a37f7c8b829b6177f7c23b9e3ea7e741e2266a Mon Sep 17 00:00:00 2001 From: LuK1337 Date: Wed, 25 Dec 2024 09:09:28 +0100 Subject: [PATCH] hudson: test: Prevent duplicates in build targets / devices.json Change-Id: I8772d66c4163c92edff8f0403618836acedc9d3e --- test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test.py b/test.py index bfd4ae19..8fe6059a 100755 --- a/test.py +++ b/test.py @@ -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() @@ -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