aboutsummaryrefslogtreecommitdiff
path: root/tools/patman
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-07-08 14:25:29 -0600
committerSimon Glass <sjg@chromium.org>2019-07-24 12:54:07 -0700
commit53cd5d921dd76d4651f2c99681a3c050743b6ba1 (patch)
treed6ce4a3ed807f36dbddd6be073bcb543c34e3968 /tools/patman
parentcf2289435c7e1134c75d9217ef32238aec0ecdbf (diff)
downloadu-boot-53cd5d921dd76d4651f2c99681a3c050743b6ba1.zip
u-boot-53cd5d921dd76d4651f2c99681a3c050743b6ba1.tar.gz
u-boot-53cd5d921dd76d4651f2c99681a3c050743b6ba1.tar.bz2
binman: Convert to use ArgumentParser
This class is the new way to handle arguments in Python. Convert binman over to use it. At the same time, introduce commands so that we can separate out the different parts of binman functionality. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman')
-rw-r--r--tools/patman/test_util.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/patman/test_util.py b/tools/patman/test_util.py
index ea36cd1..4009815 100644
--- a/tools/patman/test_util.py
+++ b/tools/patman/test_util.py
@@ -46,9 +46,10 @@ def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None):
glob_list = []
glob_list += exclude_list
glob_list += ['*libfdt.py', '*site-packages*', '*dist-packages*']
+ test_cmd = 'test' if 'binman.py' in prog else '-t'
cmd = ('PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools %s-coverage run '
- '--omit "%s" %s -P1 -t' % (build_dir, PYTHON, ','.join(glob_list),
- prog))
+ '--omit "%s" %s %s -P1' % (build_dir, PYTHON, ','.join(glob_list),
+ prog, test_cmd))
os.system(cmd)
stdout = command.Output('%s-coverage' % PYTHON, 'report')
lines = stdout.splitlines()