aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2012-06-14 20:44:04 -0400
committerGavin Andresen <gavinandresen@gmail.com>2012-06-14 20:44:04 -0400
commitfab7858a350d4650686b3aa07bd6277ce7c9685f (patch)
tree7450bc05cbee9a60863860020db0ca4c59bb9381 /doc
parent194ea3186a3331768650629826a9c6db6db84e82 (diff)
downloadbitcoin-fab7858a350d4650686b3aa07bd6277ce7c9685f.tar.xz
Document how to build/run unit tests
Diffstat (limited to 'doc')
-rw-r--r--doc/unit-tests.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/unit-tests.txt b/doc/unit-tests.txt
new file mode 100644
index 0000000000..e7f215188e
--- /dev/null
+++ b/doc/unit-tests.txt
@@ -0,0 +1,33 @@
+Compiling/runing bitcoind unit tests
+------------------------------------
+
+bitcoind unit tests are in the src/test/ directory; they
+use the Boost::Test unit-testing framework.
+
+To compile and run the tests:
+cd src
+make -f makefile.unix test_bitcoin # Replace makefile.unix if you're not on unix
+./test_bitcoin # Runs the unit tests
+
+If all tests succeed the last line of output will be:
+*** No errors detected
+
+To add more tests, add BOOST_AUTO_TEST_CASE's to the existing
+.cpp files in the test/ directory or add new .cpp files that
+implement new BOOST_AUTO_TEST_SUITE's (the makefiles are
+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:
+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.