mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-09 10:43:19 -05:00
test: Add makefile target for running unit tests
make check runs a bunch of other subtree tests that exercise code that is hardly ever changed and have a comparatively long runtime. There seems to be no target for running just the unit tests, so add one.
This commit is contained in:
parent
a11585692e
commit
5ca9b24da1
2 changed files with 5 additions and 2 deletions
|
@ -419,7 +419,9 @@ bitcoin_test_check: $(TEST_BINARY) FORCE
|
||||||
bitcoin_test_clean : FORCE
|
bitcoin_test_clean : FORCE
|
||||||
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
|
rm -f $(CLEAN_BITCOIN_TEST) $(test_test_bitcoin_OBJECTS) $(TEST_BINARY)
|
||||||
|
|
||||||
check-local: $(BITCOIN_TESTS:.cpp=.cpp.test)
|
check-unit: $(BITCOIN_TESTS:.cpp=.cpp.test)
|
||||||
|
|
||||||
|
check-local: check-unit
|
||||||
if BUILD_BITCOIN_TX
|
if BUILD_BITCOIN_TX
|
||||||
@echo "Running test/util/test_runner.py..."
|
@echo "Running test/util/test_runner.py..."
|
||||||
$(PYTHON) $(top_builddir)/test/util/test_runner.py
|
$(PYTHON) $(top_builddir)/test/util/test_runner.py
|
||||||
|
|
|
@ -15,7 +15,8 @@ that runs all of the unit tests. The main source file for the test library is fo
|
||||||
Unit tests will be automatically compiled if dependencies were met in `./configure`
|
Unit tests will be automatically compiled if dependencies were met in `./configure`
|
||||||
and tests weren't explicitly disabled.
|
and tests weren't explicitly disabled.
|
||||||
|
|
||||||
After configuring, they can be run with `make check`.
|
After configuring, they can be run with `make check`, which includes unit tests from
|
||||||
|
subtrees, or `make && make -C src check-unit` for just the unit tests.
|
||||||
|
|
||||||
To run the unit tests manually, launch `src/test/test_bitcoin`. To recompile
|
To run the unit tests manually, launch `src/test/test_bitcoin`. To recompile
|
||||||
after a test file was modified, run `make` and then run the test again. If you
|
after a test file was modified, run `make` and then run the test again. If you
|
||||||
|
|
Loading…
Add table
Reference in a new issue