mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-07-23 23:33:01 +00:00
binman: Run tests concurrently
At present the tests run one after the other using a single CPU. This is not very efficient. Bring in the concurrencytest module and run the tests concurrently, using one process for each CPU by default. A -P option allows this to be overridden, which is necessary for code-coverage to function correctly. This requires fixing a few tests which are currently not fully independent. At some point we might consider doing this across all pytests in U-Boot. There is a pytest version that supports specifying the number of processes to use, but it did not work for me. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
2673afe221
commit
11ae93eef4
12 changed files with 274 additions and 22 deletions
|
@ -43,7 +43,7 @@ def RunTestCoverage(prog, filter_fname, exclude_list, build_dir, required=None):
|
|||
glob_list += exclude_list
|
||||
glob_list += ['*libfdt.py', '*site-packages*']
|
||||
cmd = ('PYTHONPATH=$PYTHONPATH:%s/sandbox_spl/tools python-coverage run '
|
||||
'--omit "%s" %s -t' % (build_dir, ','.join(glob_list), prog))
|
||||
'--omit "%s" %s -P1 -t' % (build_dir, ','.join(glob_list), prog))
|
||||
os.system(cmd)
|
||||
stdout = command.Output('python-coverage', 'report')
|
||||
lines = stdout.splitlines()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue