diff options
author | Simon Glass <sjg@chromium.org> | 2018-09-14 13:57:11 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-09-28 20:09:01 +0300 |
commit | a326b495cdcfd56507841e38158683e6e4d5894c (patch) | |
tree | ed9f9a1077bda5d9c09346c17be149e00e017776 /tools/binman/entry_test.py | |
parent | 35b384cbe5d40e618391cc076409e89cedf9c863 (diff) | |
download | u-boot-a326b495cdcfd56507841e38158683e6e4d5894c.tar.xz |
binman: Tidy up the vblock entry
At present if there are two vblock entries an image their contents are
written to the same file in the output directory. This prevents checking
the contents of each separately.
Fix this by adding part of the entry path to the filename, and add some
missing comments.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/entry_test.py')
-rw-r--r-- | tools/binman/entry_test.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py index 6fa735ed59..4100bcc3d3 100644 --- a/tools/binman/entry_test.py +++ b/tools/binman/entry_test.py @@ -54,6 +54,17 @@ class TestEntry(unittest.TestCase): self.assertIn("Unknown entry type 'invalid-name' in node " "'invalid-path'", str(e.exception)) + def testUniqueName(self): + """Test Entry.GetUniqueName""" + import entry + Node = collections.namedtuple('Node', ['name', 'parent']) + base_node = Node('root', None) + base_entry = entry.Entry(None, None, base_node, read_node=False) + self.assertEqual('root', base_entry.GetUniqueName()) + sub_node = Node('subnode', base_node) + sub_entry = entry.Entry(None, None, sub_node, read_node=False) + self.assertEqual('root.subnode', sub_entry.GetUniqueName()) + if __name__ == "__main__": unittest.main() |