diff options
author | Simon Glass <sjg@chromium.org> | 2017-11-13 18:55:00 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-12-12 19:53:45 -0700 |
commit | 7fe9173be78f32047bc38f2d68ac86e871dbfcae (patch) | |
tree | 052690b3852f6cac6759de653cecb6659d268127 /tools/binman/binman.py | |
parent | f689890d8ec52c8b9d005fbf7f6df00dcf9895db (diff) |
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>
Diffstat (limited to 'tools/binman/binman.py')
-rwxr-xr-x | tools/binman/binman.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/binman/binman.py b/tools/binman/binman.py index 81a613ddc4..aa51396266 100755 --- a/tools/binman/binman.py +++ b/tools/binman/binman.py @@ -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() |