diff options
author | Simon Glass | 2018-10-01 21:12:47 -0600 |
---|---|---|
committer | Simon Glass | 2018-10-08 07:34:34 -0600 |
commit | 11ae93eef40c09280f36104b6a8cf5d807f0bb0d (patch) | |
tree | 66b0e782d4901eb24e87354444bb73dda4f39a0e /tools/dtoc/test_fdt.py | |
parent | 2673afe221d17b8d43df3ecae3e3a6024b209ffe (diff) |
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>
Diffstat (limited to 'tools/dtoc/test_fdt.py')
-rwxr-xr-x | tools/dtoc/test_fdt.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py index 2e6febe8f38..8d70dd2a294 100755 --- a/tools/dtoc/test_fdt.py +++ b/tools/dtoc/test_fdt.py @@ -547,6 +547,8 @@ if __name__ != '__main__': parser = OptionParser() parser.add_option('-B', '--build-dir', type='string', default='b', help='Directory containing the build output') +parser.add_option('-P', '--processes', type=int, + help='set number of processes to use for running tests') parser.add_option('-t', '--test', action='store_true', dest='test', default=False, help='run tests') parser.add_option('-T', '--test-coverage', action='store_true', |