diff mbox series

[U-Boot,18/26] binman: Add a main program to the tests

Message ID 20171113045231.15911-19-sjg@chromium.org
State Accepted
Commit 9fc60b4975b14da3693f3dd86378fb918ea13f41
Delegated to: Simon Glass
Headers show
Series test: Include Python tools in test coverage | expand

Commit Message

Simon Glass Nov. 13, 2017, 4:52 a.m. UTC
Add a main program so that the tests can be executed directly, without
going through the main binman program.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/entry_test.py | 4 ++++
 tools/binman/ftest.py      | 4 ++++
 2 files changed, 8 insertions(+)

Comments

Simon Glass Nov. 24, 2017, 1:47 a.m. UTC | #1
Add a main program so that the tests can be executed directly, without
going through the main binman program.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/entry_test.py | 4 ++++
 tools/binman/ftest.py      | 4 ++++
 2 files changed, 8 insertions(+)

Applied to u-boot-dm thanks!
diff mbox series

Patch

diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py
index 789b26fd9f5..caa523ebf89 100644
--- a/tools/binman/entry_test.py
+++ b/tools/binman/entry_test.py
@@ -55,3 +55,7 @@  class TestEntry(unittest.TestCase):
             entry.Entry.Create(None, node, node.name)
         self.assertIn("Unknown entry type 'invalid-name' in node "
                       "'invalid-path'", str(e.exception))
+
+
+if __name__ == "__main__":
+    unittest.main()
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index eae1ab1c4b1..539ebc57f57 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -813,3 +813,7 @@  class TestFunctional(unittest.TestCase):
         """Test that an image with a VBT binary can be created"""
         data = self._DoReadFile('46_intel-vbt.dts')
         self.assertEqual(VBT_DATA, data[:len(VBT_DATA)])
+
+
+if __name__ == "__main__":
+    unittest.main()