diff options
author | Ava Chow <github@achow101.com> | 2024-02-08 18:01:32 -0500 |
---|---|---|
committer | Ava Chow <github@achow101.com> | 2024-02-08 18:01:46 -0500 |
commit | 0b3202d8ef49f9f77d94eee47ad730b12e398b82 (patch) | |
tree | 2f0fd0dd258df59ba9d0c4a660468ac1b64a120d | |
parent | 5cdf31343b8a8a675627f62cac91c08a7216f71a (diff) | |
parent | 5ca9b24da18e842e7a093dc44f6b222af73e92cf (diff) | |
download | bitcoin-0b3202d8ef49f9f77d94eee47ad730b12e398b82.tar.xz |
Merge bitcoin/bitcoin#29377: test: Add makefile target for running unit tests
5ca9b24da18e842e7a093dc44f6b222af73e92cf test: Add makefile target for running unit tests (TheCharlatan)
Pull request description:
`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.
Alternatively the secp256k1 tests could be removed from the `check-local` target, reducing its runtime. This was rejected before though in https://github.com/bitcoin/bitcoin/pull/20264.
ACKs for top commit:
delta1:
utACK 5ca9b24da18e842e7a093dc44f6b222af73e92cf
edilmedeiros:
Tested ACK 5ca9b24da18e842e7a093dc44f6b222af73e92cf
achow101:
ACK 5ca9b24da18e842e7a093dc44f6b222af73e92cf
ryanofsky:
Tested ACK 5ca9b24da18e842e7a093dc44f6b222af73e92cf.
Tree-SHA512: 470969d44585d7cc33ad038a16e791db9e2be8469f52ddf122c46f20776fad34e6a48f988861a132c42540158fed05f3cf66fcc3bea05708253daaa35af54339
-rw-r--r-- | src/Makefile.test.include | 4 | ||||
-rw-r--r-- | src/test/README.md | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/Makefile.test.include b/src/Makefile.test.include index 69d44dbde6..9f9bdbbd0c 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -419,7 +419,9 @@ bitcoin_test_check: $(TEST_BINARY) FORCE bitcoin_test_clean : FORCE 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 @echo "Running test/util/test_runner.py..." $(PYTHON) $(top_builddir)/test/util/test_runner.py diff --git a/src/test/README.md b/src/test/README.md index 90d0e7102d..0876db7a72 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -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` 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 after a test file was modified, run `make` and then run the test again. If you |