aboutsummaryrefslogtreecommitdiff
path: root/bin/gensquashfs/Makemodule.am
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-01-31 11:30:46 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-01-31 18:04:25 +0100
commit72c8155d9fc0eaeac72c053f46ebb7b231d4596a (patch)
tree5758865289c52fa93f56e3fe743bb40c283c5233 /bin/gensquashfs/Makemodule.am
parentcdccc69c62579b0c13b35fad0728079652b8f3c9 (diff)
Reintegrate test code with library code
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'bin/gensquashfs/Makemodule.am')
-rw-r--r--bin/gensquashfs/Makemodule.am64
1 files changed, 64 insertions, 0 deletions
diff --git a/bin/gensquashfs/Makemodule.am b/bin/gensquashfs/Makemodule.am
index 7edc39a..052f692 100644
--- a/bin/gensquashfs/Makemodule.am
+++ b/bin/gensquashfs/Makemodule.am
@@ -17,3 +17,67 @@ endif
dist_man1_MANS += bin/gensquashfs/gensquashfs.1
bin_PROGRAMS += gensquashfs
+
+GENDATADIR=$(top_srcdir)/bin/gensquashfs/test
+
+test_filemap_xattr_SOURCES = bin/gensquashfs/test/filemap_xattr.c \
+ bin/gensquashfs/src/filemap_xattr.c \
+ bin/gensquashfs/src/mkfs.h
+test_filemap_xattr_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+test_filemap_xattr_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/xattr1.txt
+test_filemap_xattr_LDADD = libsquashfs.la libfstree.a libutil.a
+test_filemap_xattr_LDADD += libio.a libcompat.a
+
+test_fstree_from_file_SOURCES = bin/gensquashfs/test/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+test_fstree_from_file_CPPFLAGS = $(AM_CPPFLAGS)
+test_fstree_from_file_CPPFLAGS += -I$(top_srcdir)/bin/gensquashfs/src
+test_fstree_from_file_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/fstree1.txt
+test_fstree_from_file_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+test_fstree_glob1_SOURCES = bin/gensquashfs/test/fstree_glob1.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+test_fstree_glob1_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+test_fstree_glob1_CPPFLAGS += -DTESTPATH=$(GENDATADIR)
+test_fstree_glob1_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+test_fstree_from_dir_SOURCES = bin/gensquashfs/test/fstree_from_dir.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+test_fstree_from_dir_CPPFLAGS = $(AM_CPPFLAGS)
+test_fstree_from_dir_CPPFLAGS += -I$(top_srcdir)/bin/gensquashfs/src
+test_fstree_from_dir_CPPFLAGS += -DTESTPATH=$(GENDATADIR)/testdir
+test_fstree_from_dir_LDADD = libfstree.a libutil.a libcompat.a
+
+test_sort_file_SOURCES = bin/gensquashfs/test/sort_file.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/sort_by_file.c \
+ bin/gensquashfs/src/mkfs.h
+test_sort_file_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+test_sort_file_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+fstree_fuzz_SOURCES = bin/gensquashfs/test/fstree_fuzz.c \
+ bin/gensquashfs/src/fstree_from_file.c \
+ bin/gensquashfs/src/fstree_from_dir.c \
+ bin/gensquashfs/src/mkfs.h
+fstree_fuzz_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/bin/gensquashfs/src
+fstree_fuzz_LDADD = libfstree.a libio.a libutil.a libcompat.a
+
+GENSQUASHFS_TESTS = \
+ test_filemap_xattr test_fstree_from_file test_fstree_from_dir \
+ test_fstree_glob1 test_sort_file
+
+noinst_PROGRAMS += fstree_fuzz
+
+check_PROGRAMS += $(GENSQUASHFS_TESTS)
+TESTS += $(GENSQUASHFS_TESTS)
+
+EXTRA_DIST += $(GENDATADIR)/xattr1.txt $(GENDATADIR)/fstree1.txt
+EXTRA_DIST += $(GENDATADIR)/fstree_glob1.txt $(GENDATADIR)/fstree_glob2.txt
+EXTRA_DIST += $(GENDATADIR)/fstree_glob3.txt
+EXTRA_DIST += $(GENDATADIR)/testdir