From 11ae93eef40c09280f36104b6a8cf5d807f0bb0d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 21:12:47 -0600 Subject: 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 --- tools/dtoc/dtoc.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tools/dtoc/dtoc.py') diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py index 33b2589c56..2277af9bf7 100755 --- a/tools/dtoc/dtoc.py +++ b/tools/dtoc/dtoc.py @@ -89,6 +89,8 @@ parser.add_option('--include-disabled', action='store_true', help='Include disabled nodes') parser.add_option('-o', '--output', action='store', default='-', help='Select output filename') +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', -- cgit