xref: /freebsd/contrib/unbound/doc/README.tests (revision 2e3f49888ec8851bafb22011533217487764fdb0)
1README unbound tests
2
3For a quick test that runs unit tests and state machine tests, use
4	make test
5
6There is a long test setup for unbound that needs tools installed. Use
7	make longtest
8To make and run the long tests. The results are summarized at the end.
9
10You need to have the following programs installed and in your PATH.
11* dig - from the bind-tools package. Used to send DNS queries.
12* splint (optional) - for lint test
13* doxygen (optional) - for doc completeness test
14* ldns-testns - from ldns examples. Used as DNS auth server.
15* xxd and nc (optional) - for (malformed) packet transmission.
16The optional programs are detected and can be omitted.
17
18You can also use prepared Dockerfile to run tests inside docker based on latest gcc image:
19* build container: docker build -t unbound-tester -f contrib/Dockerfile.tests .
20* run container: docker run -it --mount type=bind,source="$(pwd)",target=/usr/src/unbound --rm unbound-tester
21* configure environment: ./configure
22* run test: make test
23* run long tests: make longtest
24It is worth to mention that you need to enable [ipv6 in your docker daemon configuration](https://docs.docker.com/config/daemon/ipv6/) because some tests need ipv6 network stack.
25
26testdata/ contains the data for tests.
27testcode/ contains scripts and c code for the tests.
28
29do-tests.sh : runs all the tests in the testdata directory.
30testbed.sh : compiles on a set of (user specific) hosts and runs do-tests.
31
32Tests are run using testcode/mini_tpkg.sh.
33