ostree/Makefile-tests.am
Colin Walters 7fdf072710 deltas: Heuristically detect endianness for older deltas
If the average object size is greater than 4GiB, let's assume we're
dealing with opposite endianness.  I'm fairly confident no one is
going to be shipping peta- or exa- byte size ostree deltas, period.
Past the gigabyte scale you really want bittorrent or something.
2016-02-26 08:19:01 -05:00

213 lines
6.9 KiB
Plaintext

# Makefile for tests code
#
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
if BUILDOPT_INSTALL_TESTS
insttestdir=$(pkglibexecdir)/installed-tests
testfiles = test-basic \
test-pull-subpath \
test-archivez \
test-remote-add \
test-remote-gpg-import \
test-commit-sign \
test-export \
test-help \
test-libarchive \
test-pull-archive-z \
test-pull-commit-only \
test-pull-corruption \
test-pull-depth \
test-pull-mirror-summary \
test-pull-large-metadata \
test-pull-metalink \
test-pull-summary-sigs \
test-pull-resume \
test-local-pull-depth \
test-gpg-signed-commit \
test-admin-upgrade-unconfigured \
test-admin-deploy-syslinux \
test-admin-deploy-2 \
test-admin-deploy-karg \
test-admin-deploy-switch \
test-admin-deploy-etcmerge-cornercases \
test-admin-deploy-uboot \
test-admin-instutil-set-kargs \
test-admin-upgrade-not-backwards \
test-admin-pull-deploy-commit \
test-admin-locking \
test-admin-deploy-clean \
test-repo-checkout-subpath \
test-reset-nonlinear \
test-oldstyle-partial \
test-setuid \
test-delta \
test-xattrs \
test-auto-summary \
test-prune \
$(NULL)
if BUILDOPT_FUSE
testfiles += test-rofiles-fuse
endif
insttest_SCRIPTS = $(addprefix tests/,$(testfiles:=.sh))
# This one uses corrupt-repo-ref.js
if BUILDOPT_GJS
testfiles += test-corruption
endif
testmetadir = $(datadir)/installed-tests/$(PACKAGE)
testmeta_DATA = $(testfiles:=.test)
insttest_DATA = tests/archive-test.sh \
tests/pull-test.sh \
tests/libtest.sh \
tests/admin-test.sh \
tests/basic-test.sh \
tests/test-basic-user.sh \
tests/test-local-pull.sh \
tests/corrupt-repo-ref.js \
tests/pre-endian-deltas-repo-big.tar.xz \
tests/pre-endian-deltas-repo-little.tar.xz \
$(NULL)
insttest_SCRIPTS += \
tests/syslinux-entries-crosscheck.py \
$(NULL)
gpginsttestdir = $(pkglibexecdir)/installed-tests/gpghome
gpginsttest_DATA = tests/gpghome/secring.gpg \
tests/gpghome/trustdb.gpg \
tests/gpghome/key1.asc \
tests/gpghome/key2.asc \
tests/gpghome/key3.asc
gpginsttest_trusteddir = $(pkglibexecdir)/installed-tests/gpghome/trusted
gpginsttest_trusted_DATA = tests/gpghome/trusted/pubring.gpg
install-gpg-data-hook:
ln -sf trusted/pubring.gpg $(DESTDIR)$(gpginsttestdir)/pubring.gpg
INSTALL_DATA_HOOKS += install-gpg-data-hook
%.test: tests/%.sh Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Exec=$(pkglibexecdir)/installed-tests/$(notdir $<)' >> $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Output=TAP' >> $@.tmp; \
mv $@.tmp $@)
%.test: tests/%.js Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Exec=env TESTDATADIR=$(pkglibexecdir)/installed-tests $(pkglibexecdir)/installed-tests/$(notdir $<)' >> $@.tmp; \
echo 'Type=session' >> $@.tmp; \
mv $@.tmp $@)
if BUILDOPT_GJS
insttest_SCRIPTS += tests/test-core.js \
tests/test-sizes.js \
tests/test-sysroot.js \
$(NULL)
testmeta_DATA += test-core.test test-sizes.test test-sysroot.test
endif
insttest_LTLIBRARIES = libreaddir-rand.la
libreaddir_rand_la_SOURCES = tests/readdir-rand.c
libreaddir_rand_la_CFLAGS = $(OT_INTERNAL_GIO_UNIX_CFLAGS)
libreaddir_rand_la_LIBADD = $(OT_INTERNAL_GIO_UNIX_LIBS)
libreaddir_rand_la_LDFLAGS = -avoid-version
endif
# "make check" do not depend from --enable-installed-tests
noinst_PROGRAMS += tests/test-rollsum-cli
TESTS = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \
tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum
if USE_LIBARCHIVE
TESTS += tests/test-libarchive-import
endif
check_PROGRAMS = $(TESTS)
TESTS_ENVIRONMENT = \
G_TEST_SRCDIR=$(abs_srcdir)/tests \
G_TEST_BUILDDIR=$(abs_builddir)/tests
TESTS_CFLAGS = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/libglnx
TESTS_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS)
tests_test_rollsum_cli_SOURCES = src/libostree/ostree-rollsum.c tests/test-rollsum-cli.c
tests_test_rollsum_cli_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_ZLIB_CFLAGS)
tests_test_rollsum_cli_LDADD = libbupsplit.la $(TESTS_LDADD) $(OT_DEP_ZLIB_LIBS)
tests_test_rollsum_SOURCES = src/libostree/ostree-rollsum.c tests/test-rollsum.c
tests_test_rollsum_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_ZLIB_CFLAGS)
tests_test_rollsum_LDADD = libbupsplit.la $(TESTS_LDADD) $(OT_DEP_ZLIB_LIBS)
tests_test_mutable_tree_CFLAGS = $(TESTS_CFLAGS)
tests_test_mutable_tree_LDADD = $(TESTS_LDADD)
tests_test_ot_unix_utils_CFLAGS = $(TESTS_CFLAGS)
tests_test_ot_unix_utils_LDADD = $(TESTS_LDADD)
tests_test_varint_SOURCES = src/libostree/ostree-varint.c tests/test-varint.c
tests_test_varint_CFLAGS = $(TESTS_CFLAGS)
tests_test_varint_LDADD = $(TESTS_LDADD)
tests_test_bsdiff_CFLAGS = $(TESTS_CFLAGS)
tests_test_bsdiff_LDADD = libbsdiff.la $(TESTS_LDADD)
tests_test_checksum_SOURCES = src/libostree/ostree-core.c tests/test-checksum.c
tests_test_checksum_CFLAGS = $(TESTS_CFLAGS) $(libglnx_cflags)
tests_test_checksum_LDADD = $(TESTS_LDADD)
tests_test_libarchive_import_SOURCES = tests/test-libarchive-import.c
tests_test_libarchive_import_CFLAGS = $(TESTS_CFLAGS) $(libglnx_cflags)
tests_test_libarchive_import_LDADD = $(TESTS_LDADD)
tests_test_keyfile_utils_CFLAGS = $(TESTS_CFLAGS)
tests_test_keyfile_utils_LDADD = $(TESTS_LDADD)
tests_test_ot_opt_utils_CFLAGS = $(TESTS_CFLAGS)
tests_test_ot_opt_utils_LDADD = $(TESTS_LDADD)
tests_test_ot_tool_util_CFLAGS = $(TESTS_CFLAGS)
tests_test_ot_tool_util_LDADD = $(TESTS_LDADD)
tests_test_lzma_SOURCES = src/libostree/ostree-lzma-common.c src/libostree/ostree-lzma-compressor.c \
src/libostree/ostree-lzma-decompressor.c tests/test-lzma.c
tests_test_lzma_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_LZMA_CFLAGS)
tests_test_lzma_LDADD = $(TESTS_LDADD) $(OT_DEP_LZMA_LIBS)
tests_test_gpg_verify_result_SOURCES = \
src/libostree/ostree-gpg-verify-result-private.h \
tests/test-gpg-verify-result.c
tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS)
tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS)
EXTRA_DIST += \
tests/gpg-verify-data/README.md \
tests/gpg-verify-data/lgpl2 \
tests/gpg-verify-data/lgpl2.sig \
tests/gpg-verify-data/pubring.gpg \
tests/gpg-verify-data/secring.gpg \
tests/gpg-verify-data/trustdb.gpg \
tests/gpg-verify-data/gpg.conf