buildman: Move full-help processing to main
This does not need any of the control features. Move it out of main to
reduce the size of the do_buildman() function.
For Python 3.6 the -H feature will not work, but this does not seem to be
a huge problem, as it dates from 2016.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/buildman/main.py b/tools/buildman/main.py
index d9ad836..9a1d599 100755
--- a/tools/buildman/main.py
+++ b/tools/buildman/main.py
@@ -6,6 +6,11 @@
"""See README for more information"""
+try:
+ from importlib.resources import files
+except ImportError:
+ # for Python 3.6
+ import importlib_resources
import os
import sys
@@ -19,6 +24,7 @@
from buildman import cmdline
from buildman import control
from u_boot_pylib import test_util
+from u_boot_pylib import tools
def run_tests(skip_net_tests, debug, verbose, args):
"""Run the buildman tests
@@ -64,6 +70,9 @@
return run_tests(options.skip_net_tests, options.debug, options.verbose,
args)
+ elif options.full_help:
+ tools.print_full_help(str(files('buildman').joinpath('README.rst')))
+
# Build selected commits for selected boards
else:
bsettings.Setup(options.config_file)