diff options
author | Tom Rini <trini@konsulko.com> | 2023-07-24 14:55:56 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-07-24 14:55:56 -0400 |
commit | c07ad9520c6190070513016fdb495d4703a4a853 (patch) | |
tree | ecd308f65b3b7e5f709cb09c9766f1fc8edb7783 /tools/u_boot_pylib/test_util.py | |
parent | 45622f326278db923c443b04342b59679bcbb2ba (diff) | |
parent | 407a1413e3202585ca842896365718873b170ee2 (diff) |
Merge tag 'dm-pull-24jul23' of https://source.denx.de/u-boot/custodians/u-boot-dm
buildman refactoring and --maintainer-check
binman TI support
binman cipher support
Diffstat (limited to 'tools/u_boot_pylib/test_util.py')
-rw-r--r-- | tools/u_boot_pylib/test_util.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/u_boot_pylib/test_util.py b/tools/u_boot_pylib/test_util.py index e7564e10c99..f18d385d995 100644 --- a/tools/u_boot_pylib/test_util.py +++ b/tools/u_boot_pylib/test_util.py @@ -24,7 +24,7 @@ except: def run_test_coverage(prog, filter_fname, exclude_list, build_dir, required=None, - extra_args=None): + extra_args=None, single_thread='-P1'): """Run tests and check that we get 100% coverage Args: @@ -39,6 +39,9 @@ def run_test_coverage(prog, filter_fname, exclude_list, build_dir, required=None required: List of modules which must be in the coverage report extra_args (str): Extra arguments to pass to the tool before the -t/test arg + single_thread (str): Argument string to make the tests run + single-threaded. This is necessary to get proper coverage results. + The default is '-P0' Raises: ValueError if the code coverage is not 100% @@ -58,8 +61,9 @@ def run_test_coverage(prog, filter_fname, exclude_list, build_dir, required=None if build_dir: prefix = 'PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools ' % build_dir cmd = ('%spython3-coverage run ' - '--omit "%s" %s %s %s -P1' % (prefix, ','.join(glob_list), - prog, extra_args or '', test_cmd)) + '--omit "%s" %s %s %s %s' % (prefix, ','.join(glob_list), + prog, extra_args or '', test_cmd, + single_thread or '-P1')) os.system(cmd) stdout = command.output('python3-coverage', 'report') lines = stdout.splitlines() |