mirror of https://github.com/bitcoin/bitcoin
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.0 KiB
36 lines
1.0 KiB
13 years ago
|
Compiling/running bitcoind unit tests
|
||
13 years ago
|
------------------------------------
|
||
|
|
||
12 years ago
|
bitcoind unit tests are in the `src/test/` directory; they
|
||
13 years ago
|
use the Boost::Test unit-testing framework.
|
||
|
|
||
|
To compile and run the tests:
|
||
12 years ago
|
|
||
|
cd src
|
||
|
make -f makefile.unix test_bitcoin # Replace makefile.unix if you're not on unix
|
||
|
./test_bitcoin # Runs the unit tests
|
||
13 years ago
|
|
||
|
If all tests succeed the last line of output will be:
|
||
12 years ago
|
`*** No errors detected`
|
||
13 years ago
|
|
||
12 years ago
|
To add more tests, add `BOOST_AUTO_TEST_CASE` functions to the existing
|
||
13 years ago
|
.cpp files in the test/ directory or add new .cpp files that
|
||
12 years ago
|
implement new BOOST_AUTO_TEST_SUITE sections (the makefiles are
|
||
13 years ago
|
set up to add test/*.cpp to test_bitcoin automatically).
|
||
|
|
||
|
|
||
|
Compiling/running Bitcoin-Qt unit tests
|
||
|
---------------------------------------
|
||
|
|
||
|
Bitcoin-Qt unit tests are in the src/qt/test/ directory; they
|
||
|
use the Qt unit-testing framework.
|
||
|
|
||
|
To compile and run the tests:
|
||
|
|
||
12 years ago
|
qmake bitcoin-qt.pro BITCOIN_QT_TEST=1
|
||
|
make
|
||
|
./bitcoin-qt_test
|
||
|
|
||
|
To add more tests, add them to the `src/qt/test/` directory,
|
||
|
the `src/qt/test/test_main.cpp` file, and bitcoin-qt.pro.
|