diskimage-builder/diskimage_builder/block_device/tests
Ian Wienand 35a1e7bee9 Refactor mount-point sorting
Currently we keep a global list of mount-points defined in the
configuration and automatically setup dependencies between mount nodes
based on their global "mount order" (i.e. higher directories mount
first).

The current method for achieving this is roughly to add the mount
points to a dictionary indexed my mount-point, then at "get_edge()"
call build the sorted list ... unless it has already been built
because this gets called for every node.

It seems much simpler to simply keep a sorted list of the
MountPointNode objects as we add them.  We don't need to implement a
sorting algorithm then, we can just use sort() and implement __lt__
for the nodes.

I believe the existing mount-order unit testing is sufficient; I'm
struggling to find a valid configuration where the mount-order is
*not* correctly specified in the configuration graph.

Change-Id: Idc05cdf42d95e230b9906773aa2b4a3b0f075598
2017-05-31 11:05:50 +10:00
..
config Add state object, rename "results", add unit tests 2017-05-30 20:39:00 +10:00
plugin Add state object, rename "results", add unit tests 2017-05-30 20:39:00 +10:00
__init__.py Refactor: block-device handling (local loop) 2016-09-08 04:31:01 +00:00
test_base.py Add state object, rename "results", add unit tests 2017-05-30 20:39:00 +10:00
test_config.py Refactor mount-point sorting 2017-05-31 11:05:50 +10:00
test_mount_order.py Add state object, rename "results", add unit tests 2017-05-30 20:39:00 +10:00
test_state.py Add state object, rename "results", add unit tests 2017-05-30 20:39:00 +10:00
test_utils.py block_device: reorder imports 2017-05-11 10:38:55 +10:00