From: Bartosz Golaszewski Date: Fri, 5 May 2017 15:43:06 +0000 (+0200) Subject: README: add some info on unit tests X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=35a5fdb2529ee71494f878ed89074ec9696148db;p=qemu-gpiodev%2Flibgpiod.git README: add some info on unit tests Describe how to build and use the testing framework. Signed-off-by: Bartosz Golaszewski --- diff --git a/README.md b/README.md index 75ee722..9443355 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,27 @@ Examples: # anything. Find the line by name. # gpiomon --num-events=1 --silent `gpiofind "USR-IN"` +TESTING +------- + +A comprehensive unit testing framework is included with the library and can be +used to test both the library code and the linux kernel user-space interface. + +The minimum kernel version required to run the tests is 4.11. The tests work +together with the gpio-mockup kernel module which must be enabled. NOTE: the +module must not be built-in. + +To build the testing executable run: + + ./configure --enable-tests + make check + +As opposed to standard autotools projects, libgpiod doesn't execute any tests +when invoking 'make check'. Instead the user must run them manually with +superuser privileges: + + sudo ./tests/unit/gpiod-unit + CONTRIBUTING ------------