diff --git a/tests/test_pin_build.py b/tests/test_pin_build.py index f2503a8f6..6b27c186f 100644 --- a/tests/test_pin_build.py +++ b/tests/test_pin_build.py @@ -155,7 +155,10 @@ class EveryBuildReferenceNamesThePin(unittest.TestCase): token = value.split()[-1].rsplit("/", 1)[-1].removesuffix(".tar.gz") return value in pins or any(token in v or v in value for v in versions) - if not any(names_it(str(r["value"])) for r in references): + # A reference that only dates a config_reads entry names the build + # the platform reads that file at, not this profile's pin. + justifies_pin = profile.get("pin_frozen") or profile.get("pin_follows") + if justifies_pin and not any(names_it(str(r["value"])) for r in references): disagree.append(name) for reference in references: if not cf.pin_build_revision(reference, REPO_ROOT / "platforms"):