doc: test: Explain how to run pytests in parallel

Add documentation for this so people can try it out. At present it does
not fully work.

Series-to: u-boot
Series-cc: heinrich, stephen, trini
Series-links: 254822
Series-prefix: RESEND
Series-version: 2
Series-changes: 2
- Add documentation for how to run parallel tests

Cover-letter:
test: Try to deal with some co-dependent tests
Tests are supposed to be independent. With driver model tests, the
environment is reset before each test, which ensures that.

With Python tests there is no reset of the board between tests, since we
want to run all the tests as quickly as possible and without needing the
external scripts running constantly.

In principle the Python tests can be independent if they each put the
world back the way they found it, but it turns out that some are not.
This means that some tests cannot be run unless another test is run
first. It also means that tests cannot be run in parallel, e.g. on
sandbox.

This series fixes some of them. Those that remain:

   test_gpt_swap_partitions - not sure?
   test_pinmux_status - not sure?
   test_sqfs_load - cannot be run more than once!
   test_bind_unbind_with_uclass - relies on previous test

The last one would be much better done as a C test, so it doesn't have
to deal with the changing driver tree. There isn't a lot of value in
running the test on a real board, since sandbox should find any bugs
in driver model or the 'bind' command.

If the above can be resolved we can enable parallel tests. On my test
machine (32 threads) it reduces the time from 38 seconds to 7.5s

To use this feature, see the documentaiton added, or:

   pip3 install pytest-xdist

   test/py/test.py -B sandbox --build-dir /tmp/xx -q -k 'not slow' -n32
END

Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I4b868f615036d4b8bc4d9f6a8555db49be9f6009
40 jobs for para-working
latest
Status Name Job ID Coverage
  Testsuites
canceled Build envtools #324181

canceled Build tools-only #324180

canceled Check for configs without MAINTAINERS entry #324179

canceled cppcheck #324175

canceled grep TODO/FIXME/HACK #324176

canceled htmldocs #324177

canceled Run binman, buildman, dtoc, Kconfig and patman testsuites #324182

canceled Run tests for Nokia RX-51 (aka N900) #324183

canceled sloccount #324178

 
  Test.Py
canceled evb-ast2500 test.py #324188

canceled integratorcp_cm926ejs test.py #324190

canceled qemu_arm64 test.py #324192

canceled qemu_arm test.py #324191

canceled qemu_malta64el test.py #324196

canceled qemu_malta64 test.py #324195

canceled qemu_maltael test.py #324194

canceled qemu_malta test.py #324193

canceled qemu-ppce500 test.py #324197

canceled qemu-riscv32_spl test.py #324200

canceled qemu-riscv32 test.py #324198

canceled qemu-riscv64_spl test.py #324201

canceled qemu-riscv64 test.py #324199

canceled qemu-x86_64 test.py #324203

canceled qemu-x86 test.py #324202

canceled r2dplus_i82557c test.py #324204

canceled r2dplus_pcnet test.py #324205

canceled r2dplus_rtl8139 test.py #324206

canceled r2dplus_tulip test.py #324207

canceled sandbox_flattree test.py #324189

canceled sandbox_noinst_test.py #324187

canceled sandbox_spl test.py #324186

canceled sandbox test.py #324184

canceled sandbox with clang test.py #324185

canceled xilinx_versal_virt test.py #324209

canceled xilinx_zynq_virt test.py #324208

canceled xtfpga test.py #324210

 
  World Build
canceled build all 32bit ARM platforms #324211

canceled build all 64bit ARM platforms #324212

canceled build all other platforms #324214

canceled build all PowerPC platforms #324213