mirror of
https://xff.cz/git/u-boot/
synced 2025-09-29 14:31:16 +02:00
binman: Allow easy importing of entry modules
At present entry modules can only be accessed using Entry.Lookup() or Entry.Create(). Most of the time this is fine, but sometimes a module needs to provide constants or helper functions useful to other modules. It is easier in this case to use 'import'. Add an __init__ file to permit this. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -513,6 +513,8 @@ features to produce new behaviours.
|
|||||||
modules.remove('_testing')
|
modules.remove('_testing')
|
||||||
missing = []
|
missing = []
|
||||||
for name in modules:
|
for name in modules:
|
||||||
|
if name.startswith('__'):
|
||||||
|
continue
|
||||||
module = Entry.Lookup(name, name)
|
module = Entry.Lookup(name, name)
|
||||||
docs = getattr(module, '__doc__')
|
docs = getattr(module, '__doc__')
|
||||||
if test_missing == name:
|
if test_missing == name:
|
||||||
|
0
tools/binman/etype/__init__.py
Normal file
0
tools/binman/etype/__init__.py
Normal file
@@ -58,6 +58,7 @@ def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None):
|
|||||||
test_set = set([os.path.splitext(os.path.basename(line.split()[0]))[0]
|
test_set = set([os.path.splitext(os.path.basename(line.split()[0]))[0]
|
||||||
for line in lines if '/etype/' in line])
|
for line in lines if '/etype/' in line])
|
||||||
missing_list = required
|
missing_list = required
|
||||||
|
missing_list.discard('__init__')
|
||||||
missing_list.difference_update(test_set)
|
missing_list.difference_update(test_set)
|
||||||
if missing_list:
|
if missing_list:
|
||||||
print('Missing tests for %s' % (', '.join(missing_list)))
|
print('Missing tests for %s' % (', '.join(missing_list)))
|
||||||
|
Reference in New Issue
Block a user