On a test run it only prints the summary and one message per failed
test. While having this behaviour by default is nice it might be
interesting in some case to have more information print. Make the print
mode configurable from the environment variable CK_VERBOSITY, which can
have the values "silent", "minimal", "normal" or "verbose" so we can have
different outputs.
$ sudo CK_VERBOSITY=verbose ./test-libevdev
Running suite(s): libevdev init tests
libevdev_has_event tests
libevdev event tests
100%: Checks: 79, Failures: 0, Errors: 0
test-libevdev-init.c:23:P:test_new_device:test_new_device:0: Passed
test-libevdev-init.c:28:P:test_free_device:test_free_device:0: Passed
[ ... ]
Note that the default print mode doesn't change after this patch.
Signed-off-by: Enric Balletbo i Serra <eballetbo@redhat.com>
Due to what must've been a copy/paste error many years ago, the license text
for libevdev wasn't actually the MIT license. Let's rectify this, it was
always MIT intended anyway.
To make this more obvious and reduce the chance of copy/paste mistakes, use
the SPDX license identifier in the various source files. The two installed
public header files have the full license text.
All contributors with copyrightable contributions have ACKed the license
change to MIT, either in the MR directly [1] or privately in reply to an
email.
[1] https://gitlab.freedesktop.org/libevdev/libevdev/-/merge_requests/69
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Alexander Dahl <ada@thorsis.com>
Acked-by: Andreas Pokorny <andreas.pokorny@canonical.com>
Acked-by: Armin K <krejzi@email.com>
Acked-by: Benjamin Tissoires <btissoir@redhat.com>
Acked-by: David Herrmann <dh.herrmann@gmail.com>
Acked-by: Deepa Dinamani <deepa.kernel@gmail.com>
Acked-by: Emmanuele Bassi <ebassi@gnome.org>
Acked-by: Gaetan Nadon <memsize@videotron.ca>
Acked-by: George Thomas <georgefsthomas@gmail.com>
Acked-by: Michael Forney <mforney@mforney.org>
Acked-by: Nayan Deshmukh <nayan26deshmukh@gmail.com>
Acked-by: Niclas Zeising <zeising@daemonic.se>
Acked-by: Owen W. Taylor <otaylor@fishsoup.net>
Acked-by: Peter Seiderer <ps.report@gmx.net>
Acked-by: Ran Benita <ran234@gmail.com>
Acked-by: Rosen Penev <rosenp@gmail.com>
Acked-by: Scott Jann <sjann@knight-rider.org>
Acked-by: Thilo Schulz <thilo@tjps.eu>
Acked-by: polyphemus <rolfmorel@gmail.com>
Depending on the container, or other checks don't always work. Add an extra
environment variable instead.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Even if we're root we may be running in a container without input device
nodes. In which case we should skip the test, not fail.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
It's not really autodetection, we just declare the test suites that need root
privs. But this way we can generically check for it from the main() that we
re-use across tests.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Move all tests to a special section, then loop through that section
to fetch all test suite. The result is that new tests only need to add the
source files without having to update everything else as well.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Not needed, so let's get rid of the compiler warning.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
It's a test suite, it shouldn't fill up the file system or the journal with
coredumps.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Add two log functions, one that aborts on a received message. We know when we
expect to receive an error, so anytime this happens unexpectedly should
terminate the test.
And for those tests do issue a log message, let them ignore it and don't
print anything.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The Check test framework forks by default which is annoying when running gdb.
Try to detect whether we're inside gdb by ptracing ourselves. If that works,
we're not inside a debugger. If it doesn't, then assume we're inside a
debugger and set CK_FORK to "no".
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
A bunch of tests for the new name resolver.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>