diff options
author | Benjamin Berg <bberg@redhat.com> | 2022-02-18 16:26:29 +0100 |
---|---|---|
committer | Tormod Volden <debian.tormod@gmail.com> | 2022-03-18 18:49:21 +0100 |
commit | 50b5838183611144d1133b5a58def2f058db0e6e (patch) | |
tree | be8ca06a9f62f5be701764f9ecb78444ab7ea51a /tests/Makefile.am | |
parent | 74059154ee1541e18f42e6815ece97be0df2c661 (diff) | |
download | libusb-50b5838183611144d1133b5a58def2f058db0e6e.tar.gz |
tests: Add some umockdev based tests
Add some basic umockdev tests. The setup in this case is all in one
process, but umockdev in principle could also work between processes.
This is just a start, more tests would make sense.
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r-- | tests/Makefile.am | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index cb8fad9..cf6237e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -2,6 +2,17 @@ AM_CPPFLAGS = -I$(top_srcdir)/libusb LDADD = ../libusb/libusb-1.0.la LIBS = +stress_SOURCES = stress.c libusb_testlib.h testlib.c + noinst_PROGRAMS = stress -stress_SOURCES = stress.c libusb_testlib.h testlib.c +if BUILD_UMOCKDEV_TEST +# NOTE: We add libumockdev-preload.so so that we can run tests in-process +# We also use -Wl,-lxxx as the compiler doesn't need it and libtool +# would reorder the flags otherwise. +umockdev_CPPFLAGS = ${UMOCKDEV_CFLAGS} -I$(top_srcdir)/libusb +umockdev_LDFLAGS = -Wl,--push-state,--no-as-needed -Wl,-lumockdev-preload -Wl,--pop-state ${UMOCKDEV_LIBS} +umockdev_SOURCES = umockdev.c + +noinst_PROGRAMS += umockdev +endif |