1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-03 01:32:47 +02:00

binman: Support enabling debug in tests

The elf module can provide some debugging information to assist with
figuring out what is going wrong. This is also useful in tests. Update the
-D option so that it is passed through to tests as well.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2017-11-13 18:55:00 -07:00
parent f689890d8e
commit 7fe9173be7
4 changed files with 23 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ import cmdline
import command
import control
def RunTests():
def RunTests(debug):
"""Run the functional tests and any embedded doctests"""
import elf_test
import entry_test
@@ -46,6 +46,8 @@ def RunTests():
suite.run(result)
sys.argv = [sys.argv[0]]
if debug:
sys.argv.append('-D')
# Run the entry tests first ,since these need to be the first to import the
# 'entry' module.
@@ -111,7 +113,7 @@ def RunBinman(options, args):
sys.tracebacklimit = 0
if options.test:
ret_code = RunTests()
ret_code = RunTests(options.debug)
elif options.test_coverage:
RunTestCoverage()