aboutsummaryrefslogtreecommitdiff
path: root/tools/binman/binman.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-08 13:18:48 -0600
committerSimon Glass <sjg@chromium.org>2019-07-23 20:27:58 -0700
commitee0c9a739f219c80b8a1f1abc217338c8c2087cc (patch)
treea0ae27878aa978dc0a08b616d9d58650f6a07191 /tools/binman/binman.py
parent2569e10f5b56649aa13e806da39a6238fdb53cab (diff)
downloadu-boot-ee0c9a739f219c80b8a1f1abc217338c8c2087cc.zip
u-boot-ee0c9a739f219c80b8a1f1abc217338c8c2087cc.tar.gz
u-boot-ee0c9a739f219c80b8a1f1abc217338c8c2087cc.tar.bz2
binman: Allow verbosity control when running tests
At present the -v flag is ignored with tests, so that (for example) -v2 does not have any effect. Update binman to pass this flag through to tests so that they work just like running binman normally, except in a few special cases where we are actually testing behaviour with different levels of verbosity. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/binman.py')
-rwxr-xr-xtools/binman/binman.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/binman/binman.py b/tools/binman/binman.py
index bab9882..7c1dcfb6 100755
--- a/tools/binman/binman.py
+++ b/tools/binman/binman.py
@@ -46,11 +46,12 @@ except:
import control
import test_util
-def RunTests(debug, processes, args):
+def RunTests(debug, verbosity, processes, args):
"""Run the functional tests and any embedded doctests
Args:
debug: True to enable debugging, which shows a full stack trace on error
+ verbosity: Verbosity level to use
args: List of positional args provided to binman. This can hold a test
name to execute (as in 'binman -t testSections', for example)
processes: Number of processes to use to run tests (None=same as #CPUs)
@@ -71,6 +72,8 @@ def RunTests(debug, processes, args):
sys.argv = [sys.argv[0]]
if debug:
sys.argv.append('-D')
+ if verbosity:
+ sys.argv.append('-v%d' % verbosity)
# Run the entry tests first ,since these need to be the first to import the
# 'entry' module.
@@ -153,7 +156,8 @@ def RunBinman(options, args):
sys.tracebacklimit = 0
if options.test:
- ret_code = RunTests(options.debug, options.processes, args[1:])
+ ret_code = RunTests(options.debug, options.verbosity, options.processes,
+ args[1:])
elif options.test_coverage:
RunTestCoverage()