Makefile: Add a pcheck option to run tests in parallel
Running tests in parallel is much faster, e.g. 15 seconds to run the tests
on sandbox (only), instead of 100 seconds (on a 16-core machine). Add a
'make pcheck' option to access this feature.
Note that the tools/ tests still run each tool's tests once after the
other, although within that, they do run in parallel. So for example,
the buildman tests run in parallel, then the binman tests run in
parallel. There would be a signiificant advantage to running them all
in parallel together, but that would require a large amount of
refactoring, e.g. with more use of pytest fixtures.
Update the documentation to represent the current state.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/Makefile b/Makefile
index 27375f0..0b8079c 100644
--- a/Makefile
+++ b/Makefile
@@ -521,8 +521,8 @@
no-dot-config-targets := clean clobber mrproper distclean \
help %docs check% coccicheck \
- ubootversion backup tests check qcheck tcheck pylint \
- pylint_err
+ ubootversion backup tests check pcheck qcheck tcheck \
+ pylint pylint_err
config-targets := 0
mixed-targets := 0
@@ -2364,6 +2364,7 @@
@echo 'Test targets:'
@echo ''
@echo ' check - Run all automated tests that use sandbox'
+ @echo ' pcheck - Run quick automated tests in parallel'
@echo ' qcheck - Run quick automated tests that use sandbox'
@echo ' tcheck - Run quick automated tests on tools'
@echo ' pylint - Run pylint on all Python files'
@@ -2409,6 +2410,9 @@
tests check:
$(srctree)/test/run
+pcheck:
+ $(srctree)/test/run parallel
+
qcheck:
$(srctree)/test/run quick