1

I am running the Bitcoin Core functional tests using the test runner and it is taking a long time to get through all the tests. Is there a way to speed it up?

test/functional/test_runner.py --extended

1 Answer 1

2

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 --jobs=n

The individual tests and the test_runner harness have many command-line options. Run test/functional/test_runner.py -h to see them all.

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 -j60 works 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.

If you increase parallelism some tests may end up failing due to timeouts as the functional tests require a fairly fast and unburdened system to run. Reducing parallelism and/or increasing the timeout scale (both are test runner arguments) are two approaches to try if you are experiencing failures due to timeouts.

Alternatively you can run functional tests on a RAM disk using these commands for Mac:

diskutil erasevolume HFS+ RAMDisk `hdiutil attach -nomount ram://10485760` 

test/functional/test_runner.py --jobs=50 --cachedir=/Volumes/RAMDisk/cache --tmpdir=/Volumes/RAMDisk/tmp

Thanks to wumpus and provoostenator for adding comments on IRC.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.