We can't automatically run unit tests from 'make check' as the test
executable works together with the gpio-mockup kernel module. Without
any additional udev configuration /dev/gpiochipX files are only
accessible for superuser.
Print a message explaining what to do after the tests are built.
NOTE: the message says that linux kernel >=v4.11 is needed to run the
tests. This is not true currently, as we don't test events yet. Event
injecting over debugfs is a new feature of gpio-mockup and will be
available in the upcoming kernel release.
Once v4.11 is released and appropriate test cases implemented, we'll
make it a hard requirement for tests.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
tests-line.c \
tests-misc.c \
tests-simple-api.c
+
+check: check-am
+ @echo "********************************************************"
+ @echo "* Unit tests have been built as tests/unit/gpio-unit. *"
+ @echo "* *"
+ @echo "* They require linux kernel version >=v4.11 and the *"
+ @echo "* gpio-mockup module (must not be built-in). *"
+ @echo "* *"
+ @echo "* Run the test executable with superuser privileges or *"
+ @echo "* make sure /dev/gpiochipX files are readable and *"
+ @echo "* writable by normal users. *"
+ @echo "********************************************************"