diff options
author | Simon Glass | 2020-08-05 13:27:46 -0600 |
---|---|---|
committer | Simon Glass | 2020-08-22 08:53:38 -0600 |
commit | 87d43329ef7698eab5b090a91228269c39643122 (patch) | |
tree | 9440be9be37be55fee8329b841253dbf0317685e /tools/binman/ftest.py | |
parent | 702e57e113d85fef60ebe9e5c87194414666cfac (diff) |
binman: Move GetEntryModules() to control
When binman is installed its main program is in a different directory
to its modules. This means that __file__ is different and we cannot use
it to obtain the path to etype/ from main.py
To fix this, move the function to the 'control' module, since it is
installed with all the other modules, including the etype/ directory.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r-- | tools/binman/ftest.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index bf7f59fb841..fedcc1ada1b 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -24,7 +24,6 @@ from binman import control from binman import elf from binman import elf_test from binman import fmap_util -from binman import main from binman import state from dtoc import fdt from dtoc import fdt_util @@ -1440,14 +1439,14 @@ class TestFunctional(unittest.TestCase): def testEntryDocs(self): """Test for creation of entry documentation""" with test_util.capture_sys_output() as (stdout, stderr): - control.WriteEntryDocs(main.GetEntryModules()) + control.WriteEntryDocs(control.GetEntryModules()) self.assertTrue(len(stdout.getvalue()) > 0) def testEntryDocsMissing(self): """Test handling of missing entry documentation""" with self.assertRaises(ValueError) as e: with test_util.capture_sys_output() as (stdout, stderr): - control.WriteEntryDocs(main.GetEntryModules(), 'u_boot') + control.WriteEntryDocs(control.GetEntryModules(), 'u_boot') self.assertIn('Documentation is missing for modules: u_boot', str(e.exception)) |