EDITED 2017/03/23. This PR is now ready for wider review
This PR adds the following make targets:
make unit_tests
: runs the unit testsmake functional_tests
: runs a small number of functional tests. Currently those tests are:- nodehandling - ‘Test node handling’
- httpbasics - ‘Test the RPC HTTP basics’
- invalidblockrequest - ‘Test node responses to invalid blocks’
- blockchain - ‘Test RPCs related to blockchain state’
- rpcnamedargs - ‘Test using named arguments for RPCs’ (but any feedback is welcome on whether we should change that list)
make all_functional_tests
: runs all the functional tests, including the extended testsmake util_tests
: runs the bitcoin-tx tests
make check
is updated to run the unit_tests, functional_tests and util_tests targets.
All make test targets can be run from the root directory or the src directory.
In this implementation I’ve moved the functional and util targets to their own /test/Makefile.include
file to separate them from the unit tests.
~This is a WIP PR and shouldn’t be merged yet. I’ve opened this to solicit feedback, particularly from @theuni , @MarcoFalke and @jtimon.~
~This PR does the following:~
- ~move the running of the ‘integration’ tests (currently the python functional tests and bitcoin-tx tests) from
make check
in /src/Makefile.test.include tomake check
in a new /test/Makefile.include file. Functionally, there is no difference for users runningmake check
from the base dir, but it makes more sense to contain the integration tests in their own makefile rather then executing them from /src~ - ~runs a small number of functional tests as part of
make check
. I picked the following since they cover basic functionality and are fairly quick to run (20s when run in parallel on my PC), but I’m happy to change the list if people think we should add/remove particular tests:~- ~nodehandling - ‘Test node handling’~
- ~httpbasics - ‘Test the RPC HTTP basics’~
- ~invalidblockrequest - ‘Test node responses to invalid blocks’~
- ~blockchain - ‘Test RPCs related to blockchain state’~
- ~rpcnamedargs - ‘Test using named arguments for RPCs’~
~@jtimon - you mentioned wanting to keep separate make targets for just running the unit tests or just running the functional tests. I haven’t implemented that yet, but I plan to before this PR gets merged. Are you happy with the target names make unittests
and make functionaltests
?~