mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
merge bitcoin#22861: Update test README and lint script
This commit is contained in:
parent
8a05f0caaa
commit
e220175d0f
@ -252,7 +252,7 @@ EXTRA_DIST += \
|
|||||||
test/fuzz
|
test/fuzz
|
||||||
|
|
||||||
EXTRA_DIST += \
|
EXTRA_DIST += \
|
||||||
test/util/bitcoin-util-test.py \
|
test/util/test_runner.py \
|
||||||
test/util/data/bitcoin-util-test.json \
|
test/util/data/bitcoin-util-test.json \
|
||||||
test/util/data/blanktxv1.hex \
|
test/util/data/blanktxv1.hex \
|
||||||
test/util/data/blanktxv1.json \
|
test/util/data/blanktxv1.json \
|
||||||
|
@ -14,7 +14,6 @@ update-alternatives --install /usr/bin/clang-format-diff clang-format-diff $(whi
|
|||||||
${CI_RETRY_EXE} pip3 install codespell==2.0.0
|
${CI_RETRY_EXE} pip3 install codespell==2.0.0
|
||||||
${CI_RETRY_EXE} pip3 install flake8==3.8.3
|
${CI_RETRY_EXE} pip3 install flake8==3.8.3
|
||||||
${CI_RETRY_EXE} pip3 install vulture==2.3
|
${CI_RETRY_EXE} pip3 install vulture==2.3
|
||||||
${CI_RETRY_EXE} pip3 install yq
|
|
||||||
${CI_RETRY_EXE} pip3 install mypy==0.781
|
${CI_RETRY_EXE} pip3 install mypy==0.781
|
||||||
|
|
||||||
SHELLCHECK_VERSION=v0.8.0
|
SHELLCHECK_VERSION=v0.8.0
|
||||||
|
@ -1923,7 +1923,7 @@ AC_CONFIG_LINKS([contrib/filter-lcov.py:contrib/filter-lcov.py])
|
|||||||
AC_CONFIG_LINKS([contrib/macdeploy/background.tiff:contrib/macdeploy/background.tiff])
|
AC_CONFIG_LINKS([contrib/macdeploy/background.tiff:contrib/macdeploy/background.tiff])
|
||||||
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
|
AC_CONFIG_LINKS([test/functional/test_runner.py:test/functional/test_runner.py])
|
||||||
AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py])
|
AC_CONFIG_LINKS([test/fuzz/test_runner.py:test/fuzz/test_runner.py])
|
||||||
AC_CONFIG_LINKS([test/util/bitcoin-util-test.py:test/util/bitcoin-util-test.py])
|
AC_CONFIG_LINKS([test/util/test_runner.py:test/util/test_runner.py])
|
||||||
AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py])
|
AC_CONFIG_LINKS([test/util/rpcauth-test.py:test/util/rpcauth-test.py])
|
||||||
|
|
||||||
dnl boost's m4 checks do something really nasty: they export these vars. As a
|
dnl boost's m4 checks do something really nasty: they export these vars. As a
|
||||||
|
@ -80,7 +80,6 @@ RUN pip3 install \
|
|||||||
pyzmq \
|
pyzmq \
|
||||||
vulture==2.3 \
|
vulture==2.3 \
|
||||||
mypy==0.781 \
|
mypy==0.781 \
|
||||||
yq \
|
|
||||||
multiprocess
|
multiprocess
|
||||||
|
|
||||||
# dash_hash
|
# dash_hash
|
||||||
|
@ -16,6 +16,9 @@ $ FUZZ=process_message src/test/fuzz/fuzz
|
|||||||
# abort fuzzing using ctrl-c
|
# abort fuzzing using ctrl-c
|
||||||
```
|
```
|
||||||
|
|
||||||
|
There is also a runner script to execute all fuzz targets. Refer to
|
||||||
|
`./test/fuzz/test_runner.py --help` for more details.
|
||||||
|
|
||||||
## Fuzzing harnesses and output
|
## Fuzzing harnesses and output
|
||||||
|
|
||||||
[`process_message`](https://github.com/dashpay/dash/blob/develop/src/test/fuzz/process_message.cpp) is a fuzzing harness for the [`ProcessMessage(...)` function (`net_processing`)](https://github.com/dashpay/dash/blob/develop/src/net_processing.cpp). The available fuzzing harnesses are found in [`src/test/fuzz/`](https://github.com/dashpay/dash/tree/develop/src/test/fuzz).
|
[`process_message`](https://github.com/dashpay/dash/blob/develop/src/test/fuzz/process_message.cpp) is a fuzzing harness for the [`ProcessMessage(...)` function (`net_processing`)](https://github.com/dashpay/dash/blob/develop/src/net_processing.cpp). The available fuzzing harnesses are found in [`src/test/fuzz/`](https://github.com/dashpay/dash/tree/develop/src/test/fuzz).
|
||||||
|
@ -375,8 +375,8 @@ check-unit: $(BITCOIN_TESTS:.cpp=.cpp.test)
|
|||||||
|
|
||||||
check-local: check-unit
|
check-local: check-unit
|
||||||
if BUILD_BITCOIN_TX
|
if BUILD_BITCOIN_TX
|
||||||
@echo "Running test/util/bitcoin-util-test.py..."
|
@echo "Running test/util/test_runner.py..."
|
||||||
$(PYTHON) $(top_builddir)/test/util/bitcoin-util-test.py
|
$(PYTHON) $(top_builddir)/test/util/test_runner.py
|
||||||
endif
|
endif
|
||||||
@echo "Running test/util/rpcauth-test.py..."
|
@echo "Running test/util/rpcauth-test.py..."
|
||||||
$(PYTHON) $(top_builddir)/test/util/rpcauth-test.py
|
$(PYTHON) $(top_builddir)/test/util/rpcauth-test.py
|
||||||
|
@ -5,20 +5,24 @@ etc.
|
|||||||
|
|
||||||
This directory contains the following sets of tests:
|
This directory contains the following sets of tests:
|
||||||
|
|
||||||
|
- [fuzz](/test/fuzz) A runner to execute all fuzz targets from
|
||||||
|
[/src/test/fuzz](/src/test/fuzz).
|
||||||
- [functional](/test/functional) which test the functionality of
|
- [functional](/test/functional) which test the functionality of
|
||||||
dashd and dash-qt by interacting with them through the RPC and P2P
|
dashd and dash-qt by interacting with them through the RPC and P2P
|
||||||
interfaces.
|
interfaces.
|
||||||
- [util](/test/util) which tests the dash utilities, currently only
|
- [util](/test/util) which tests the utilities (dash-tx, ...).
|
||||||
dash-tx.
|
|
||||||
- [lint](/test/lint/) which perform various static analysis checks.
|
- [lint](/test/lint/) which perform various static analysis checks.
|
||||||
|
|
||||||
The util tests are run as part of `make check` target. The functional
|
The util tests are run as part of `make check` target. The fuzz tests, functional
|
||||||
tests and lint scripts can be run as explained in the sections below.
|
tests and lint scripts can be run as explained in the sections below.
|
||||||
|
|
||||||
# Running tests locally
|
# Running tests locally
|
||||||
|
|
||||||
Before tests can be run locally, Dash Core must be built. See the [building instructions](/doc#building) for help.
|
Before tests can be run locally, Dash Core must be built. See the [building instructions](/doc#building) for help.
|
||||||
|
|
||||||
|
## Fuzz tests
|
||||||
|
|
||||||
|
See [/doc/fuzzing.md](/doc/fuzzing.md)
|
||||||
|
|
||||||
### Functional tests
|
### Functional tests
|
||||||
|
|
||||||
@ -297,7 +301,7 @@ For ways to generate more granular profiles, see the README in
|
|||||||
|
|
||||||
### Util tests
|
### Util tests
|
||||||
|
|
||||||
Util tests can be run locally by running `test/util/bitcoin-util-test.py`.
|
Util tests can be run locally by running `test/util/test_runner.py`.
|
||||||
Use the `-v` option for verbose output.
|
Use the `-v` option for verbose output.
|
||||||
|
|
||||||
### Lint tests
|
### Lint tests
|
||||||
@ -309,7 +313,6 @@ Use the `-v` option for verbose output.
|
|||||||
| [`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`
|
| [`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`
|
||||||
| [`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`
|
| [`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`
|
||||||
| [`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)
|
| [`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)
|
||||||
| [`lint-shell.sh`](lint/lint-shell.sh) | [yq](https://github.com/kislyuk/yq) | default | `pip3 install yq`
|
|
||||||
| [`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`
|
| [`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`
|
||||||
|
|
||||||
Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated.
|
Please be aware that on Linux distributions all dependencies are usually available as packages, but could be outdated.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
# These environment variables are set by the build process and read by
|
# These environment variables are set by the build process and read by
|
||||||
# test/functional/test_runner.py and test/util/bitcoin-util-test.py
|
# test/*/test_runner.py and test/util/rpcauth-test.py
|
||||||
|
|
||||||
[environment]
|
[environment]
|
||||||
PACKAGE_NAME=@PACKAGE_NAME@
|
PACKAGE_NAME=@PACKAGE_NAME@
|
||||||
|
Loading…
Reference in New Issue
Block a user