binman: Run tests concurrently
authorSimon Glass <sjg@chromium.org>
Tue, 2 Oct 2018 03:12:47 +0000 (21:12 -0600)
committerSimon Glass <sjg@chromium.org>
Mon, 8 Oct 2018 13:34:34 +0000 (07:34 -0600)
commit11ae93eef40c09280f36104b6a8cf5d807f0bb0d
tree66b0e782d4901eb24e87354444bb73dda4f39a0e
parent2673afe221d17b8d43df3ecae3e3a6024b209ffe
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>
12 files changed:
.travis.yml
test/py/README.md
tools/binman/binman.py
tools/binman/cmdline.py
tools/binman/entry_test.py
tools/binman/ftest.py
tools/concurrencytest/.gitignore [new file with mode: 0644]
tools/concurrencytest/README.md [new file with mode: 0644]
tools/concurrencytest/concurrencytest.py [new file with mode: 0644]
tools/dtoc/dtoc.py
tools/dtoc/test_fdt.py
tools/patman/test_util.py