binman: Set up 'entry' to permit full test coverage
[oweals/u-boot.git] / tools / binman / binman.py
index 09dc36a3f7913b356c1d5eaf0a68ad76eeaf61da..963d43a3761a6953a5116d7e6a1afd4919199550 100755 (executable)
@@ -21,7 +21,7 @@ for dirname in ['../patman', '../dtoc', '..']:
     sys.path.insert(0, os.path.join(our_path, dirname))
 
 # Bring in the libfdt module
-sys.path.insert(0, 'tools')
+sys.path.insert(0, 'scripts/dtc/pylibfdt')
 
 # Also allow entry-type modules to be brought in from the etype directory.
 sys.path.insert(0, os.path.join(our_path, 'etype'))
@@ -34,7 +34,7 @@ def RunTests():
     """Run the functional tests and any embedded doctests"""
     import entry_test
     import fdt_test
-    import func_test
+    import ftest
     import test
     import doctest
 
@@ -44,7 +44,7 @@ def RunTests():
         suite.run(result)
 
     sys.argv = [sys.argv[0]]
-    for module in (func_test.TestFunctional, fdt_test.TestFdt,
+    for module in (ftest.TestFunctional, fdt_test.TestFdt,
                    entry_test.TestEntry):
         suite = unittest.TestLoader().loadTestsFromTestCase(module)
         suite.run(result)
@@ -58,7 +58,7 @@ def RunTests():
 def RunTestCoverage():
     """Run the tests and check that we get 100% coverage"""
     # This uses the build output from sandbox_spl to get _libfdt.so
-    cmd = ('PYTHONPATH=%s/sandbox_spl/tools coverage run '
+    cmd = ('PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools coverage run '
             '--include "tools/binman/*.py" --omit "*test*,*binman.py" '
             'tools/binman/binman.py -t' % options.build_dir)
     os.system(cmd)