summaryrefslogtreecommitdiff
path: root/tests/Makemodule.am
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-05 15:53:21 +0100
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-03-06 22:08:36 +0100
commitb950412ca3a91aa37349cf51ebe98cc84767d448 (patch)
treee3bb062114d019984321a5a21b29818c88c36795 /tests/Makemodule.am
parent3fc6bf24b5cc071fc323f08ece541e37578f6369 (diff)
Cleanup: add some structure to the test directory
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'tests/Makemodule.am')
-rw-r--r--tests/Makemodule.am287
1 files changed, 5 insertions, 282 deletions
diff --git a/tests/Makemodule.am b/tests/Makemodule.am
index dd49ccd..8669fb1 100644
--- a/tests/Makemodule.am
+++ b/tests/Makemodule.am
@@ -1,294 +1,17 @@
-test_canonicalize_name_SOURCES = tests/canonicalize_name.c tests/test.h
-test_canonicalize_name_LDADD = libfstree.a
-
-test_str_table_SOURCES = tests/str_table.c tests/test.h
-test_str_table_LDADD = libutil.a libfstream.a libcompat.a
-test_str_table_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests
-test_str_table_CPPFLAGS += -I$(top_srcdir)/lib/sqfs
-
-test_rbtree_SOURCES = tests/rbtree.c tests/test.h
-test_rbtree_LDADD = libutil.a libcompat.a
-test_rbtree_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/sqfs
-
-test_xxhash_SOURCES = tests/xxhash.c
-test_xxhash_LDADD = libutil.a libcompat.a
-test_xxhash_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/sqfs
-
-test_abi_SOURCES = tests/abi.c tests/test.h
-test_abi_LDADD = libsquashfs.la
-
-check_PROGRAMS += test_canonicalize_name test_str_table test_abi test_rbtree
-check_PROGRAMS += test_xxhash
-TESTS += test_canonicalize_name test_str_table test_abi test_rbtree test_xxhash
+include tests/libutil/Makemodule.am
+include tests/libfstream/Makemodule.am
+include tests/libfstree/Makemodule.am
+include tests/libtar/Makemodule.am
+include tests/libsqfs/Makemodule.am
if BUILD_TOOLS
-test_mknode_simple_SOURCES = tests/mknode_simple.c tests/test.h
-test_mknode_simple_LDADD = libfstree.a libcompat.a
-
-test_mknode_slink_SOURCES = tests/mknode_slink.c tests/test.h
-test_mknode_slink_LDADD = libfstree.a libcompat.a
-
-test_mknode_reg_SOURCES = tests/mknode_reg.c tests/test.h
-test_mknode_reg_LDADD = libfstree.a libcompat.a
-
-test_mknode_dir_SOURCES = tests/mknode_dir.c tests/test.h
-test_mknode_dir_LDADD = libfstree.a libcompat.a
-
-test_gen_inode_numbers_SOURCES = tests/gen_inode_numbers.c tests/test.h
-test_gen_inode_numbers_LDADD = libfstree.a libcompat.a
-
-test_add_by_path_SOURCES = tests/add_by_path.c tests/test.h
-test_add_by_path_LDADD = libfstree.a libcompat.a
-
-test_get_path_SOURCES = tests/get_path.c tests/test.h
-test_get_path_LDADD = libfstree.a libcompat.a
-
-test_fstree_sort_SOURCES = tests/fstree_sort.c tests/test.h
-test_fstree_sort_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree
-test_fstree_sort_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_fstree_from_file_SOURCES = tests/fstree_from_file.c tests/test.h
-test_fstree_from_file_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/fstree1.txt
-test_fstree_from_file_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_fstree_glob1_SOURCES = tests/fstree_glob1.c tests/test.h
-test_fstree_glob1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests
-test_fstree_glob1_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_fstree_from_dir_SOURCES = tests/fstree_from_dir.c tests/test.h
-test_fstree_from_dir_CPPFLAGS = $(AM_CPPFLAGS)
-test_fstree_from_dir_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_fstree_from_dir_LDADD = libfstree.a libcompat.a
-
-test_fstree_init_SOURCES = tests/fstree_init.c tests/test.h
-test_fstree_init_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/lib/fstree
-test_fstree_init_LDADD = libfstree.a libfstream.a libcompat.a
-
-test_filename_sane_SOURCES = tests/filename_sane.c lib/fstree/filename_sane.c
-
-test_filename_sane_w32_SOURCES = tests/filename_sane.c
-test_filename_sane_w32_SOURCES += lib/fstree/filename_sane.c
-test_filename_sane_w32_CPPFLAGS = $(AM_CPPFLAGS) -DTEST_WIN32=1
-
-test_tar_gnu0_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu0_CPPFLAGS += -DTESTFILE=format-acceptance/gnu.tar
-
-test_tar_gnu1_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu1_CPPFLAGS += -DTESTFILE=format-acceptance/gnu-g.tar
-
-test_tar_gnu2_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu2_CPPFLAGS += -DTESTFILE=user-group-largenum/gnu.tar
-test_tar_gnu2_CPPFLAGS += -DTESTUID=0x80000000 -DTESTGID=0x80000000
-test_tar_gnu2_CPPFLAGS += -DTESTTS=1542995392
-
-test_tar_gnu3_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu3_CPPFLAGS += -DTESTFILE=negative-mtime/gnu.tar -DTESTTS=-315622800
-
-test_tar_gnu4_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu4_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu4_CPPFLAGS += -DTESTFILE=long-paths/gnu.tar -DLONG_NAME_TEST
-test_tar_gnu4_CPPFLAGS += -DTESTTS=1542909670
-
-test_tar_gnu5_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_gnu5_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu5_CPPFLAGS += -DTESTFILE=large-mtime/gnu.tar -DTESTTS=8589934592L
-
-test_tar_gnu6_SOURCES = tests/tar_big_file.c tests/test.h
-test_tar_gnu6_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_gnu6_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_gnu6_CPPFLAGS += -DTESTFILE=file-size/gnu.tar
-
-test_tar_pax0_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax0_CPPFLAGS += -DTESTFILE=format-acceptance/pax.tar
-
-test_tar_pax1_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax1_CPPFLAGS += -DTESTFILE=user-group-largenum/pax.tar
-test_tar_pax1_CPPFLAGS += -DTESTUID=2147483648UL -DTESTGID=2147483648UL
-test_tar_pax1_CPPFLAGS += -DTESTTS=1542995392
-
-test_tar_pax2_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax2_CPPFLAGS += -DTESTFILE=large-mtime/pax.tar -DTESTTS=8589934592L
-
-test_tar_pax3_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax3_CPPFLAGS += -DTESTFILE=negative-mtime/pax.tar -DTESTTS=-315622800
-
-test_tar_pax4_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_pax4_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax4_CPPFLAGS += -DTESTFILE=long-paths/pax.tar
-test_tar_pax4_CPPFLAGS += -DLONG_NAME_TEST -DTESTTS=1542909670
-
-test_tar_pax5_SOURCES = tests/tar_big_file.c tests/test.h
-test_tar_pax5_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_pax5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_pax5_CPPFLAGS += -DTESTFILE=file-size/pax.tar
-
-test_tar_ustar0_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar0_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar0_CPPFLAGS += -DTESTFILE=format-acceptance/ustar.tar
-
-test_tar_ustar1_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar1_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar1_CPPFLAGS += -DTESTFILE=format-acceptance/ustar-pre-posix.tar
-
-test_tar_ustar2_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar2_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar2_CPPFLAGS += -DTESTFILE=format-acceptance/v7.tar
-
-test_tar_ustar3_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar3_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar3_CPPFLAGS += -DTESTFILE=user-group-largenum/8-digit.tar
-test_tar_ustar3_CPPFLAGS += -DTESTUID=8388608 -DTESTGID=8388608
-test_tar_ustar3_CPPFLAGS += -DTESTTS=1542995392
-
-test_tar_ustar4_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar4_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar4_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar4_CPPFLAGS += -DTESTFILE=large-mtime/12-digit.tar
-test_tar_ustar4_CPPFLAGS += -DTESTTS=8589934592L
-
-test_tar_ustar5_SOURCES = tests/tar_simple.c tests/test.h
-test_tar_ustar5_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar5_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar5_CPPFLAGS += -DTESTFILE=long-paths/ustar.tar
-test_tar_ustar5_CPPFLAGS += -DLONG_NAME_TEST -DTESTTS=1542909670
-
-test_tar_ustar6_SOURCES = tests/tar_big_file.c tests/test.h
-test_tar_ustar6_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_ustar6_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_ustar6_CPPFLAGS += -DTESTFILE=file-size/12-digit.tar
-
-test_tar_target_filled_SOURCES = tests/tar_target_filled.c tests/test.h
-test_tar_target_filled_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_target_filled_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_target_filled_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-
-test_tar_sparse_gnu_SOURCES = tests/tar_sparse_gnu.c tests/test.h
-test_tar_sparse_gnu_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-
-test_tar_sparse_gnu0_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu0_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu0_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu0_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu0_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu0-0.tar
-
-test_tar_sparse_gnu1_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu1_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu1_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu1_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu1_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu0-1.tar
-
-test_tar_sparse_gnu2_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu2_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu2_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu2_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu2_CPPFLAGS += -DTESTFILE=sparse-files/pax-gnu1-0.tar
-
-test_tar_sparse_gnu3_SOURCES = tests/tar_sparse.c tests/test.h
-test_tar_sparse_gnu3_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_sparse_gnu3_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_sparse_gnu3_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_sparse_gnu3_CPPFLAGS += -DTESTFILE=sparse-files/gnu.tar
-
-test_tar_xattr_bsd_SOURCES = tests/tar_xattr.c tests/test.h
-test_tar_xattr_bsd_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_xattr_bsd_CPPFLAGS = $(AM_CPPFLAGS) -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_xattr_bsd_CPPFLAGS += -DTESTFILE=xattr/xattr-libarchive.tar
-
-test_tar_xattr_schily_SOURCES = tests/tar_xattr.c tests/test.h
-test_tar_xattr_schily_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_xattr_schily_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_xattr_schily_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_xattr_schily_CPPFLAGS += -DTESTFILE=xattr/xattr-schily.tar
-
-test_tar_xattr_schily_bin_SOURCES = tests/tar_xattr_bin.c tests/test.h
-test_tar_xattr_schily_bin_LDADD = libtar.a libfstream.a libcompat.a
-test_tar_xattr_schily_bin_CPPFLAGS = $(AM_CPPFLAGS)
-test_tar_xattr_schily_bin_CPPFLAGS += -DTESTPATH=$(top_srcdir)/tests/tar
-test_tar_xattr_schily_bin_CPPFLAGS += -DTESTFILE=xattr/xattr-schily-binary.tar
-
-fstree_fuzz_SOURCES = tests/fstree_fuzz.c
-fstree_fuzz_LDADD = libfstree.a libfstream.a libcompat.a
-
-tar_fuzz_SOURCES = tests/tar_fuzz.c
-tar_fuzz_LDADD = libtar.a libfstream.a libcompat.a
-
-test_get_line_SOURCES = tests/get_line.c tests/test.h
-test_get_line_LDADD = libfstream.a libcompat.a
-test_get_line_CPPFLAGS = $(AM_CPPFLAGS)
-test_get_line_CPPFLAGS += -DTESTFILE=$(top_srcdir)/tests/get_line.txt
-
-check_PROGRAMS += test_mknode_simple test_mknode_slink test_mknode_reg
-check_PROGRAMS += test_mknode_dir test_gen_inode_numbers test_add_by_path
-check_PROGRAMS += test_get_path test_fstree_sort test_fstree_from_file
-check_PROGRAMS += test_fstree_init test_filename_sane test_filename_sane_w32
-check_PROGRAMS += test_fstree_from_dir test_fstree_glob1
-check_PROGRAMS += test_tar_ustar0 test_tar_ustar1 test_tar_ustar2
-check_PROGRAMS += test_tar_ustar3 test_tar_ustar4 test_tar_ustar5
-check_PROGRAMS += test_tar_ustar6
-check_PROGRAMS += test_tar_pax0 test_tar_pax1 test_tar_pax2 test_tar_pax3
-check_PROGRAMS += test_tar_pax4 test_tar_pax5
-check_PROGRAMS += test_tar_gnu0 test_tar_gnu1 test_tar_gnu2 test_tar_gnu3
-check_PROGRAMS += test_tar_gnu4 test_tar_gnu5 test_tar_gnu6
-check_PROGRAMS += test_tar_sparse_gnu test_tar_sparse_gnu0 test_tar_sparse_gnu1
-check_PROGRAMS += test_tar_sparse_gnu2 test_tar_sparse_gnu3
-check_PROGRAMS += test_tar_xattr_bsd test_tar_xattr_schily
-check_PROGRAMS += test_tar_xattr_schily_bin test_tar_target_filled
-check_PROGRAMS += test_get_line
-
-noinst_PROGRAMS += fstree_fuzz tar_fuzz
-
-TESTS += test_mknode_simple test_mknode_slink
-TESTS += test_mknode_reg test_mknode_dir test_gen_inode_numbers
-TESTS += test_add_by_path test_get_path test_fstree_sort test_fstree_from_file
-TESTS += test_fstree_init test_filename_sane test_filename_sane_w32
-TESTS += test_fstree_from_dir test_fstree_glob1
-TESTS += test_tar_ustar0 test_tar_ustar1 test_tar_ustar2 test_tar_ustar3
-TESTS += test_tar_ustar4 test_tar_ustar5 test_tar_ustar6
-TESTS += test_tar_gnu0 test_tar_gnu1 test_tar_gnu2 test_tar_gnu3 test_tar_gnu4
-TESTS += test_tar_gnu5 test_tar_gnu6
-TESTS += test_tar_pax0 test_tar_pax1 test_tar_pax2 test_tar_pax3 test_tar_pax4
-TESTS += test_tar_pax5
-TESTS += test_tar_sparse_gnu test_tar_sparse_gnu0
-TESTS += test_tar_sparse_gnu1 test_tar_sparse_gnu2 test_tar_sparse_gnu3
-TESTS += test_tar_xattr_bsd test_tar_xattr_schily
-TESTS += test_tar_xattr_schily_bin test_tar_target_filled test_get_line
-
if CORPORA_TESTS
check_SCRIPTS += tests/cantrbry.sh tests/test_tar_sqfs.sh tests/pack_dir_root.sh
TESTS += tests/cantrbry.sh tests/test_tar_sqfs.sh tests/pack_dir_root.sh
endif
endif
-EXTRA_DIST += $(top_srcdir)/tests/tar $(top_srcdir)/tests/words.txt
EXTRA_DIST += $(top_srcdir)/tests/tar2sqfs
-EXTRA_DIST += $(top_srcdir)/tests/fstree1.txt
-EXTRA_DIST += $(top_srcdir)/tests/fstree_glob1.txt
-EXTRA_DIST += $(top_srcdir)/tests/fstree_glob2.txt
EXTRA_DIST += $(top_srcdir)/tests/corpus/cantrbry.tar.xz
EXTRA_DIST += $(top_srcdir)/tests/corpus/cantrbry.sha512
EXTRA_DIST += $(top_srcdir)/tests/pack_dir_root.txt.ref
-EXTRA_DIST += $(top_srcdir)/tests/get_line.txt