The Bitcoin Core test README states:
By default, up to 4 tests will be run in parallel by test_runner. To
specify how many jobs to run, append
The individual tests and the test_runner harness have many
command-line options. Run
test/functional/test_runner.py -hto see
Pieter Wuille also explained how he gets the total time down below 4 minutes on GitHub:
You can run them in parallel; if you have sufficient RAM pretty extremely even.
test_runner.py -j60works fine on my 4-core 32 GiB RAM system, taking 3m46s. A lot of the time consists of processes waiting for each other, so it’s not actually CPU bound.