aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/binman.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-07-17 13:25:36 -0600
committerSimon Glass <sjg@chromium.org>2018-08-01 16:30:48 -0600
commitfd8d1f79623d2944d9ca8469a3681d53b8b277f9 (patch)
treee8faca4c85020b0d712e576f4dd23f80664d098b /tools/binman/binman.py
parent3fb397bba01a511f8ca2b091a359495e18badd7e (diff)
downloadu-boot-fd8d1f79623d2944d9ca8469a3681d53b8b277f9.zip
u-boot-fd8d1f79623d2944d9ca8469a3681d53b8b277f9.tar.gz
u-boot-fd8d1f79623d2944d9ca8469a3681d53b8b277f9.tar.bz2
binman: Allow creation of entry documentation
Binman supports quite a number of different entries now. The operation of these is not always obvious but at present the source code is the only reference for understanding how an entry works. Add a way to create documentation (from the source code) which can be put in a new 'README.entries' file. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/binman.py')
-rwxr-xr-xtools/binman/binman.py22
1 files changed, 14 insertions, 8 deletions
diff --git a/tools/binman/binman.py b/tools/binman/binman.py
index 52e02ed..1536e95 100755
--- a/tools/binman/binman.py
+++ b/tools/binman/binman.py
@@ -77,9 +77,20 @@ def RunTests(debug, args):
return 1
return 0
+def GetEntryModules(include_testing=True):
+ """Get a set of entry class implementations
+
+ Returns:
+ Set of paths to entry class filenames
+ """
+ glob_list = glob.glob(os.path.join(our_path, 'etype/*.py'))
+ return set([os.path.splitext(os.path.basename(item))[0]
+ for item in glob_list
+ if include_testing or '_testing' not in item])
+
def RunTestCoverage():
"""Run the tests and check that we get 100% coverage"""
- glob_list = glob.glob(os.path.join(our_path, 'etype/*.py'))
+ glob_list = GetEntryModules(False)
all_set = set([os.path.splitext(os.path.basename(item))[0]
for item in glob_list if '_testing' not in item])
test_util.RunTestCoverage('tools/binman/binman.py', None,
@@ -107,13 +118,8 @@ def RunBinman(options, args):
elif options.test_coverage:
RunTestCoverage()
- elif options.full_help:
- pager = os.getenv('PAGER')
- if not pager:
- pager = 'more'
- fname = os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),
- 'README')
- command.Run(pager, fname)
+ elif options.entry_docs:
+ control.WriteEntryDocs(GetEntryModules())
else:
try: