qa.dox 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. // Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. /**
  15. @page qa Kea Quality Assurance processes
  16. @section qaUnitTests Unit-tests
  17. Kea uses the Google C++ Testing Framework (also called googletest or gtest) as a
  18. base for our C++ unit-tests. See http://code.google.com/p/googletest/ for
  19. details. We used to have Python unit-tests that were inherited from BIND10
  20. days. Those tests are removed now, so please do not develop any new Python
  21. tests in Kea. If you want to write DHCP tests in Python, we encourage you to
  22. take a look at ISC Forge: http://kea.isc.org/wiki/IscForge. You must have \c
  23. gtest installed or at least extracted in a directory before compiling Kea
  24. unit-tests. To enable unit-tests in Kea, use:
  25. @code
  26. ./configure --with-gtest=/path/to/your/gtest/dir
  27. @endcode
  28. or
  29. @code
  30. ./configure --with-gtest-source=/path/to/your/gtest/dir
  31. @endcode
  32. Depending on how you compiled or installed \c gtest (e.g. from sources
  33. or using some package management system) one of those two switches will
  34. find \c gtest. After that you make run unit-tests:
  35. @code
  36. make check
  37. @endcode
  38. The following environment variable can affect unit-tests:
  39. - KEA_LOCKFILE_DIR - Specifies a directory where the logging system should
  40. create its lock file. If not specified, it is prefix/var/run/kea, where prefix
  41. defaults to /usr/local. This variable must not end with a slash. There is one
  42. special value: "none", which instructs Kea to not create lock file at
  43. all. This may cause issues if several processes log to the same file.
  44. Also see Kea User's Guide, section 15.3.
  45. - KEA_LOGGER_DESTINATION - Specifies logging destination. If not set, logged
  46. messages will not be recorded anywhere. There are 3 special values:
  47. stdout, stderr and syslog. Any other value is interpreted as a filename.
  48. Also see Kea User's Guide, section 15.3.
  49. - KEA_PIDFILE_DIR - Specifies the directory which should be used for PID files
  50. as used by dhcp::Daemon or its derivatives. If not specified, the default is
  51. prefix/var/run/kea, where prefix defaults to /usr/local. This variable must
  52. not end with a slash.
  53. - KEA_SOCKET_TEST_DIR - if set, it specifies the directory where Unix
  54. sockets are created. There's OS limitation on how long a Unix socket
  55. path can be. It is typcially slightly over 100 characters. If you
  56. happen to build and run unit-tests in deeply nested directories, this
  57. may become a problem. KEA_SOCKET_TEST_DIR can be specified to instruct
  58. unit-test to use a different directory. Must not end with slash (e.g.
  59. /tmp).
  60. */