diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2011-01-19 10:59:03 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2011-01-31 09:11:56 +1000 |
commit | 4bc52aba794c3054535e0c2af174b26144d39002 (patch) | |
tree | 7b63fcc23660ba28829623991f9e6e389a6080a7 /test/Makefile.am | |
parent | 23ed0b11c24582caa6465c8fa083e8e830ce6a75 (diff) | |
download | xf86-input-wacom-4bc52aba794c3054535e0c2af174b26144d39002.tar.gz |
Add a testing framework for the driver.
This uses glib's testing framework provided glib-devel was available at
configure time (same as the X server's testing framework).
How this works:
The wacom driver is recompiled for the testing framework and linked into the
wacom-tests binary (there's a warning about that but ignore that). Since the
.so uses a number of symbols from the Xorg binary, these are provided as
stubs in fake-symbols.c. Additional binaries can be added through the
check_PROGRAMS automake variable.
The driver will be rebuild without static symbols for the test, allowing
each function call to be tested.
To run the tests, run 'make check'.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Diffstat (limited to 'test/Makefile.am')
-rw-r--r-- | test/Makefile.am | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Makefile.am b/test/Makefile.am new file mode 100644 index 0000000..1898fe3 --- /dev/null +++ b/test/Makefile.am @@ -0,0 +1,18 @@ +if UNITTESTS +include ../src/Makefile.am + +check_PROGRAMS = wacom-tests +check_LTLIBRARRIES = @DRIVER_NAME@_drv.la +@DRIVER_NAME@_drv_la_CFLAGS = -DDISABLE_STATIC -I$(top_srcdir)/src $(XORG_CFLAGS) $(CWARNFLAGS) -fvisibility=default + +TESTS=$(check_PROGRAMS) + +INCLUDES = -I$(top_srcdir)/src +AM_CFLAGS += $(GLIB_CFLAGS) +TEST_LDADD=$(GLIB_LIBS) @DRIVER_NAME@_drv.la +COMMON_SOURCES=fake-symbols.c fake-symbols.h + +wacom_tests_LDADD=$(TEST_LDADD) +wacom_tests_SOURCES=wacom-tests.c $(COMMON_SOURCES) + +endif |