Source: piglit Version: 0.0~git20250409.af62c0dea-2 Severity: wishlist Tags: patch User: reproducible-bui...@lists.alioth.debian.org Usertags: randomness X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org
Hi, Whilst working on the Reproducible Builds effort [0], we noticed that piglit could not be built reproducibly. This is because when rendering sets in an XML file, it does so via by calling repr() on the set object, which results in nondeterminstic output. Patch attached that renders the set as sorted whilst retaining the "{a, b, c}" nomenclature. [0] https://reproducible-builds.org/ Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git tests/serializer.py tests/serializer.py index 5ee9a15..e2c48e1 100644 --- tests/serializer.py +++ tests/serializer.py @@ -67,6 +67,8 @@ def _serialize_skips(test, elem): if not value: value = getattr(test, f, None) if value: + if isinstance(value, set): + value = "{" + repr(sorted(value))[1:-1] + "}" et.SubElement(elem, 'option', name=f, value=repr(value))