summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomek Mrugalski <tomasz@isc.org>2017-06-16 21:30:19 +0200
committerTomek Mrugalski <tomasz@isc.org>2017-06-16 21:30:19 +0200
commit2254245dae88bb467021572922d4e4436ce55b5c (patch)
treef6b7c66345d96c2b4441b86d3a6e589961561d98
parent70601da7ec64edce84fd9dc06f4a5c08e320bde1 (diff)
downloadisc-dhcp-2254245dae88bb467021572922d4e4436ce55b5c.tar.gz
[rt19430] Quick description for shell tests added.
-rw-r--r--doc/devel/mainpage.dox1
-rw-r--r--doc/devel/shell-tests.dox31
-rw-r--r--tests/HOWTO-unit-test16
3 files changed, 48 insertions, 0 deletions
diff --git a/doc/devel/mainpage.dox b/doc/devel/mainpage.dox
index b6d5c431..a6ec4dea 100644
--- a/doc/devel/mainpage.dox
+++ b/doc/devel/mainpage.dox
@@ -15,6 +15,7 @@
- @subpage testsAtf
- @subpage testsAtfAdding
- @subpage testsAtfCoding
+ - @subpage shellTests
- @subpage qa
- @subpage qaTests
- @subpage cppcheck
diff --git a/doc/devel/shell-tests.dox b/doc/devel/shell-tests.dox
new file mode 100644
index 00000000..9c722070
--- /dev/null
+++ b/doc/devel/shell-tests.dox
@@ -0,0 +1,31 @@
+/**
+ @page shellTests Shell Tests
+
+There is a certain small number of shell unit-tests. Those tests are located
+in tests/shell directory. They use the same framework as Kea
+(http://kea.isc.org), ISC's new DHCP server software. Shell tests
+currently cover two features: ability of the dhclient to call external
+script when certain events happen; and the proper behavior of linux
+script.
+
+The tests use a framework that is defined in tests/shell/dhcp_test_lib.sh.
+It offers a number of utility functions, like pretty printing start and
+end of a test, waiting for a message to appear in file, terminate process etc.
+
+It is envisaged that each component will have its own tests written in a
+separate file. Two examples are dhclient_tests.sh (that tests dhclient) and
+linux_script_tests.sh (which test a script intended to be used on Linux). An
+example minimal skeleton file is available in example_tests.sh. It contains
+one passing, one skipping and one failing test.
+
+To run unit-tests, use the following commands:
+
+@verbatim
+cd tests
+make check
+@endverbatim
+
+If you want to add extra tests, please add your unit-tests to SHTESTS in
+tests/Makefile.am file.
+
+*/
diff --git a/tests/HOWTO-unit-test b/tests/HOWTO-unit-test
index e00b7d58..df900987 100644
--- a/tests/HOWTO-unit-test
+++ b/tests/HOWTO-unit-test
@@ -29,6 +29,22 @@ We are using ATF (Automated Test Framework) as a framework to run our
unit tests. See ISC DHCP Developer's Guide for much more thorough
description of unit-test and ATF framework in general.
+We also have shell tests.
+
+Shell tests
+-----------
+
+Shell tests do not have any special dependencies. They can be run on
+any system, but certain tests may be skipped if certain conditions are
+not met. Detailed description is available in Developer's Guide
+(or see doc/devel/shell-tests.dox). To see the Developer's Guide, run
+those commands:
+
+cd doc
+make devel
+
+and then open doc/html/index.html
+
Installing ATF
--------------
ATF sources can be downloaded from https://github.com/jmmv/kyua. ATF