scripts/build/elf_parser.py: make dependency graph output deterministic
Python's sets are not deterministic.
`devices` were already sorted but `dev_supports` is still a
non-deterministic set. Sort dev_supports to make the graph output
deterministic.
Fixes commit 29942475c5ce ("scripts: gen_handles: output dependency graph")
It is quite ironic that this initial and non-deterministic graph commit
was concurrent with and slightly delayed other commit
f896fc2306a0 ("scripts: gen_handles: Sort the device handles") which
fixed another, similar non-determinism issue in the same area. A true
"whack-a-mole"!
Signed-off-by: Marc Herbert <marc.herbert@intel.com>
diff --git a/scripts/build/elf_parser.py b/scripts/build/elf_parser.py
index 07ca6f0..101e61d 100644
--- a/scripts/build/elf_parser.py
+++ b/scripts/build/elf_parser.py
@@ -283,6 +283,6 @@
)
dot.node(str(dev.ordinal), text)
for dev in self.devices:
- for sup in dev.devs_supports:
+ for sup in sorted(dev.devs_supports):
dot.edge(str(dev.ordinal), str(sup.ordinal))
return dot