浏览代码

binman: Add a main program to the tests

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>
Simon Glass 7 年之前
父节点
当前提交
9fc60b4975
共有 2 个文件被更改,包括 8 次插入0 次删除
  1. 4 0
      tools/binman/entry_test.py
  2. 4 0
      tools/binman/ftest.py

+ 4 - 0
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()

+ 4 - 0
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()