mirror of
https://gitlab.freedesktop.org/libevdev/libevdev.git
synced 2025-12-28 22:30:07 +01:00
test: add basic link test
This test doesn't do anything but compile and link against libevdev. It's a simple protection to avoid linker errors. If we ever have libs we depend on and they don't get resolved properly, this test should warn us in time. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
2487950f65
commit
e947fdc4c7
3 changed files with 12 additions and 1 deletions
1
test/.gitignore
vendored
1
test/.gitignore
vendored
|
|
@ -1,3 +1,4 @@
|
|||
gcov-report.txt
|
||||
test-libevdev
|
||||
test-link
|
||||
test-compile-pedantic
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
if BUILD_TESTS
|
||||
run_tests = test-libevdev
|
||||
build_tests = test-compile-pedantic
|
||||
build_tests = test-compile-pedantic test-link
|
||||
|
||||
noinst_PROGRAMS = $(run_tests) $(build_tests)
|
||||
|
||||
|
|
@ -39,6 +39,10 @@ test_libevdev_LDADD = $(CHECK_LIBS) $(GCOV_LDFLAGS)
|
|||
test_compile_pedantic_SOURCES = test-compile-pedantic.c
|
||||
test_compile_pedantic_CFLAGS = $(AM_CPPFLAGS) -pedantic -Werror -std=c90
|
||||
|
||||
test_link_SOURCES = test-link.c
|
||||
test_link_CFLAGS = -I$(top_srcdir)
|
||||
test_link_LDADD = $(top_builddir)/libevdev/libevdev.la
|
||||
|
||||
if GCOV_ENABLED
|
||||
|
||||
CLEANFILES = gcov-report.txt
|
||||
|
|
|
|||
6
test/test-link.c
Normal file
6
test/test-link.c
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#include <stddef.h>
|
||||
#include <libevdev/libevdev.h>
|
||||
|
||||
int main(void) {
|
||||
return libevdev_new_from_fd(0, NULL);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue