From 9dba18de42b0674396c5e2626331d3230532cb56 Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 8 Mar 2017 15:09:27 +0100 Subject: [PATCH] tests: print an info message after building tests 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 --- tests/unit/Makefile.am | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index 031be75..24e091b 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -19,3 +19,15 @@ gpiod_unit_SOURCES = gpiod-unit.c \ 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 "********************************************************" -- 2.30.2