Skip to content

Commit 78d39f8

Browse files
committed
Merge bitcoin/bitcoin#22861: test: Update test README and lint script
fa0937d test: Rename bitcoin-util-test.py to util/test_runner.py (MarcoFalke) fa050bb test: Update test README and lint script (MarcoFalke) Pull request description: * Remove unused `yq` * Update fuzzing docs ACKs for top commit: Saviour1001: ACK <code>[fa0937d](https://github.com/bitcoin/bitcoin/pull/22861/commits/fa0937de35176fdcf637e1af16be4469725e60cc)</code> practicalswift: cr ACK fa0937d fanquake: ACK fa0937d Tree-SHA512: 6b148d838e1fcf219ab92e579948e34ea7ce8b4692a3d28bb2a51aaa34cbc7cdbd79e72ce787b485fdf524e5b3521b033692583602d4e379bd160e0e41d66e28
2 parents 0ebd88f + fa0937d commit 78d39f8

File tree

9 files changed

+17
-12
lines changed

9 files changed

+17
-12
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ after_build:
5151
test_script:
5252
- cmd: src\test_bitcoin.exe -l test_suite
5353
- cmd: src\bench_bitcoin.exe > NUL
54-
- ps: python test\util\bitcoin-util-test.py
54+
- ps: python test\util\test_runner.py
5555
- cmd: python test\util\rpcauth-test.py
5656
# Fee estimation test failing on appveyor with: WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted.
5757
# functional tests disabled for now. See

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ EXTRA_DIST += \
286286
test/fuzz
287287

288288
EXTRA_DIST += \
289-
test/util/bitcoin-util-test.py \
289+
test/util/test_runner.py \
290290
test/util/data/bitcoin-util-test.json \
291291
test/util/data/blanktxv1.hex \
292292
test/util/data/blanktxv1.json \

ci/lint/04_install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(whi
1313

1414
${CI_RETRY_EXE} pip3 install codespell==2.0.0
1515
${CI_RETRY_EXE} pip3 install flake8==3.8.3
16-
${CI_RETRY_EXE} pip3 install yq
1716
${CI_RETRY_EXE} pip3 install mypy==0.781
1817
${CI_RETRY_EXE} pip3 install vulture==2.3
1918

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1874,7 +1874,7 @@ AC_CONFIG_LINKS([contrib/devtools/test-symbol-check.py:contrib/devtools/test-sym
18741874
AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
18751875
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
18761876
AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py])
1877-
AC_CONFIG_LINKS([test/util/bitcoin-util-test.py:test/util/bitcoin-util-test.py])
1877+
AC_CONFIG_LINKS([test/util/test_runner.py:test/util/test_runner.py])
18781878
AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py])
18791879

18801880
dnl boost's m4 checks do something really nasty: they export these vars. As a

doc/fuzzing.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ $ FUZZ=process_message src/test/fuzz/fuzz
1616
# abort fuzzing using ctrl-c
1717
```
1818

19+
There is also a runner script to execute all fuzz targets. Refer to
20+
`./test/fuzz/test_runner.py --help` for more details.
21+
1922
## Fuzzing harnesses and output
2023

2124
[`process_message`](https://github.com/bitcoin/bitcoin/blob/master/src/test/fuzz/process_message.cpp) is a fuzzing harness for the [`ProcessMessage(...)` function (`net_processing`)](https://github.com/bitcoin/bitcoin/blob/master/src/net_processing.cpp). The available fuzzing harnesses are found in [`src/test/fuzz/`](https://github.com/bitcoin/bitcoin/tree/master/src/test/fuzz).

src/Makefile.test.include

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,8 @@ bitcoin_test_clean : FORCE
337337

338338
check-local: $(BITCOIN_TESTS:.cpp=.cpp.test)
339339
if BUILD_BITCOIN_TX
340-
@echo "Running test/util/bitcoin-util-test.py..."
341-
$(PYTHON) $(top_builddir)/test/util/bitcoin-util-test.py
340+
@echo "Running test/util/test_runner.py..."
341+
$(PYTHON) $(top_builddir)/test/util/test_runner.py
342342
endif
343343
@echo "Running test/util/rpcauth-test.py..."
344344
$(PYTHON) $(top_builddir)/test/util/rpcauth-test.py

test/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ etc.
55

66
This directory contains the following sets of tests:
77

8+
- [fuzz](/test/fuzz) A runner to execute all fuzz targets from
9+
[/src/test/fuzz](/src/test/fuzz).
810
- [functional](/test/functional) which test the functionality of
911
bitcoind and bitcoin-qt by interacting with them through the RPC and P2P
1012
interfaces.
11-
- [util](/test/util) which tests the bitcoin utilities, currently only
12-
bitcoin-tx.
13+
- [util](/test/util) which tests the utilities (bitcoin-util, bitcoin-tx, ...).
1314
- [lint](/test/lint/) which perform various static analysis checks.
1415

15-
The util tests are run as part of `make check` target. The functional
16+
The util tests are run as part of `make check` target. The fuzz tests, functional
1617
tests and lint scripts can be run as explained in the sections below.
1718

1819
# Running tests locally
1920

2021
Before tests can be run locally, Bitcoin Core must be built. See the [building instructions](/doc#building) for help.
2122

23+
## Fuzz tests
24+
25+
See [/doc/fuzzing.md](/doc/fuzzing.md)
2226

2327
### Functional tests
2428

@@ -257,7 +261,7 @@ For ways to generate more granular profiles, see the README in
257261

258262
### Util tests
259263

260-
Util tests can be run locally by running `test/util/bitcoin-util-test.py`.
264+
Util tests can be run locally by running `test/util/test_runner.py`.
261265
Use the `-v` option for verbose output.
262266

263267
### Lint tests
@@ -269,7 +273,6 @@ Use the `-v` option for verbose output.
269273
| [`lint-python.sh`](lint/lint-python.sh) | [flake8](https://gitlab.com/pycqa/flake8) | [3.8.3](https://github.com/bitcoin/bitcoin/pull/19348) | `pip3 install flake8==3.8.3`
270274
| [`lint-python.sh`](lint/lint-python.sh) | [mypy](https://github.com/python/mypy) | [0.781](https://github.com/bitcoin/bitcoin/pull/19348) | `pip3 install mypy==0.781`
271275
| [`lint-shell.sh`](lint/lint-shell.sh) | [ShellCheck](https://github.com/koalaman/shellcheck) | [0.7.2](https://github.com/bitcoin/bitcoin/pull/21749) | [details...](https://github.com/koalaman/shellcheck#installing)
272-
| [`lint-shell.sh`](lint/lint-shell.sh) | [yq](https://github.com/kislyuk/yq) | default | `pip3 install yq`
273276
| [`lint-spelling.sh`](lint/lint-spelling.sh) | [codespell](https://github.com/codespell-project/codespell) | [2.0.0](https://github.com/bitcoin/bitcoin/pull/20817) | `pip3 install codespell==2.0.0`
274277

275278
Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated.

test/config.ini.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

55
# These environment variables are set by the build process and read by
6-
# test/functional/test_runner.py and test/util/bitcoin-util-test.py
6+
# test/*/test_runner.py and test/util/rpcauth-test.py
77

88
[environment]
99
PACKAGE_NAME=@PACKAGE_NAME@
File renamed without changes.

0 commit comments

Comments
 (0)