diff options
author | Daniel Walter <dwalter@sigma-star.at> | 2016-08-31 10:11:14 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2016-11-17 11:36:56 +0100 |
commit | e635677589fa9fed6310e8ec2c3cab7afa93b9ce (patch) | |
tree | 7fd732eea10c4144f0068d8b45ce99d585694fdc /tests | |
parent | 005cef532697be0746c72632f94cfeae67a2a187 (diff) |
Add Makefile for unittests
Signed-off-by: Daniel Walter <dwalter@sigma-star.at>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/Makemodule.am | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/unittests/Makemodule.am b/tests/unittests/Makemodule.am new file mode 100644 index 0000000..b7bad94 --- /dev/null +++ b/tests/unittests/Makemodule.am @@ -0,0 +1,16 @@ +ubilib_test_SOURCES = tests/unittests/libubi_test.c ubi-utils/libubi.c +ubilib_test_LDADD = $(CMOCKA_LIBS) +ubilib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=stat -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek +ubilib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I ubi-utils/include -I include -DSYSFS_ROOT='"tests/unittests/sysfs_mock"' + +mtdlib_test_SOURCES = tests/unittests/libmtd_test.c lib/libmtd.c lib/libmtd_legacy.c +mtdlib_test_LDADD = $(CMOCKA_LIBS) +mtdlib_test_LDFLAGS = -Wl,--wrap=open -Wl,--wrap=close -Wl,--wrap=stat -Wl,--wrap=ioctl -Wl,--wrap=read -Wl,--wrap=lseek -Wl,--wrap=write +mtdlib_test_CPPFLAGS = -O0 --std=gnu99 $(CMOCKA_CFLAGS) -I lib/ -I include -DSYSFS_ROOT='"tests/unittests/sysfs_mock"' + +TEST_BINS = \ + ubilib_test \ + mtdlib_test + + +noinst_PROGRAMS += $(TEST_BINS) |