2007-01-16 06:54:29 -05:00
README unbound tests
2010-08-16 09:30:37 -04:00
For a quick test that runs unit tests and state machine tests, use
2007-10-18 09:05:41 -04:00
make test
2010-08-16 09:30:37 -04:00
There is a long test setup for unbound that needs tools installed. Use
make longtest
To make and run the long tests. The results are summarized at the end.
2008-02-22 05:19:49 -05:00
You need to have the following programs installed and in your PATH.
* dig - from the bind-tools package. Used to send DNS queries.
* splint (optional) - for lint test
* doxygen (optional) - for doc completeness test
2010-07-05 09:34:01 -04:00
* ldns-testns - from ldns examples. Used as DNS auth server.
2008-02-22 05:19:49 -05:00
* xxd and nc (optional) - for (malformed) packet transmission.
The optional programs are detected and can be omitted.
2021-07-27 06:03:51 -04:00
You can also use prepared Dockerfile to run tests inside docker based on latest gcc image:
2021-08-04 06:57:55 -04:00
* build container: docker build -t unbound-tester -f contrib/Dockerfile.tests .
2021-07-27 06:03:51 -04:00
* run container: docker run -it --mount type=bind,source="$(pwd)",target=/usr/src/unbound --rm unbound-tester
* configure environment: ./configure
* run test: make test
* run long tests: make longtest
It 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.
2007-01-16 06:54:29 -05:00
testdata/ contains the data for tests.
testcode/ contains scripts and c code for the tests.
do-tests.sh : runs all the tests in the testdata directory.
testbed.sh : compiles on a set of (user specific) hosts and runs do-tests.
2007-10-18 09:05:41 -04:00
Tests are run using testcode/mini_tpkg.sh.