diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-26 22:35:13 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-01-28 11:20:26 +0000 |
commit | 5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d (patch) | |
tree | d96dd135ada4750579c31449dc91c944b8dec89f /lib/bb/cooker.py | |
parent | a783bd7e457f183a279dbe5a4ef3d4c17bb4c18c (diff) | |
download | bitbake-contrib-5f7c6ec785f70beb1a4a1bbc0eb83cfa6cd7740d.tar.gz |
cooker: Sort task graph (dot) file output
This means two different graph files can easily be compared, currently
you'd have to sort them as the output is randomized.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/cooker.py')
-rw-r--r-- | lib/bb/cooker.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py index 28717f429..cd365f780 100644 --- a/lib/bb/cooker.py +++ b/lib/bb/cooker.py @@ -856,12 +856,12 @@ class BBCooker: with open('task-depends.dot', 'w') as f: f.write("digraph depends {\n") - for task in depgraph["tdepends"]: + for task in sorted(depgraph["tdepends"]): (pn, taskname) = task.rsplit(".", 1) fn = depgraph["pn"][pn]["filename"] version = depgraph["pn"][pn]["version"] f.write('"%s.%s" [label="%s %s\\n%s\\n%s"]\n' % (pn, taskname, pn, taskname, version, fn)) - for dep in depgraph["tdepends"][task]: + for dep in sorted(depgraph["tdepends"][task]): f.write('"%s" -> "%s"\n' % (task, dep)) f.write("}\n") logger.info("Task dependencies saved to 'task-depends.dot'") @@ -869,18 +869,18 @@ class BBCooker: with open('recipe-depends.dot', 'w') as f: f.write("digraph depends {\n") pndeps = {} - for task in depgraph["tdepends"]: + for task in sorted(depgraph["tdepends"]): (pn, taskname) = task.rsplit(".", 1) if pn not in pndeps: pndeps[pn] = set() - for dep in depgraph["tdepends"][task]: + for dep in sorted(depgraph["tdepends"][task]): (deppn, deptaskname) = dep.rsplit(".", 1) pndeps[pn].add(deppn) - for pn in pndeps: + for pn in sorted(pndeps): fn = depgraph["pn"][pn]["filename"] version = depgraph["pn"][pn]["version"] f.write('"%s" [label="%s\\n%s\\n%s"]\n' % (pn, pn, version, fn)) - for dep in pndeps[pn]: + for dep in sorted(pndeps[pn]): if dep == pn: continue f.write('"%s" -> "%s"\n' % (pn, dep)) |