mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-20 06:50:06 +01:00
test: add a build test for -Wpedantic
A user of libevdev may be compiled with -Wpedantic. Our header files should not produce any warnings, so add a simple test that merely includes both public header files and compiles with -Wpedantic -Werror. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
This commit is contained in:
parent
5812ae0b7a
commit
a742d253b7
3 changed files with 11 additions and 1 deletions
1
test/.gitignore
vendored
1
test/.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
gcov-report.txt
|
||||
test-libevdev
|
||||
test-compile-pedantic
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
if BUILD_TESTS
|
||||
noinst_PROGRAMS = test-libevdev
|
||||
noinst_PROGRAMS = test-libevdev test-compile-pedantic
|
||||
|
||||
TESTS = $(noinst_PROGRAMS)
|
||||
|
||||
|
|
@ -33,6 +33,9 @@ test_libevdev_SOURCES = \
|
|||
|
||||
test_libevdev_LDADD = $(CHECK_LIBS) $(GCOV_LDFLAGS)
|
||||
|
||||
test_compile_pedantic_SOURCES = test-compile-pedantic.c
|
||||
test_compile_pedantic_CFLAGS = $(AM_CPPFLAGS) -Wpedantic -Werror -std=c90
|
||||
|
||||
if GCOV_ENABLED
|
||||
|
||||
CLEANFILES = gcov-report.txt
|
||||
|
|
|
|||
6
test/test-compile-pedantic.c
Normal file
6
test/test-compile-pedantic.c
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#include <libevdev/libevdev.h>
|
||||
#include <libevdev/libevdev-uinput.h>
|
||||
|
||||
int main(void) {
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue