Blame Makefile-tests.am

rpm-build 0fba15
# Makefile for tests code
rpm-build 0fba15
#
rpm-build 0fba15
# Copyright (C) 2013 Colin Walters <walters@verbum.org>
rpm-build 0fba15
#
rpm-build 0fba15
# SPDX-License-Identifier: LGPL-2.0+
rpm-build 0fba15
#
rpm-build 0fba15
# This library is free software; you can redistribute it and/or
rpm-build 0fba15
# modify it under the terms of the GNU Lesser General Public
rpm-build 0fba15
# License as published by the Free Software Foundation; either
rpm-build 0fba15
# version 2 of the License, or (at your option) any later version.
rpm-build 0fba15
#
rpm-build 0fba15
# This library is distributed in the hope that it will be useful,
rpm-build 0fba15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0fba15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build 0fba15
# Lesser General Public License for more details.
rpm-build 0fba15
#
rpm-build 0fba15
# You should have received a copy of the GNU Lesser General Public
rpm-build 0fba15
# License along with this library; if not, write to the
rpm-build 0fba15
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
rpm-build 0fba15
# Boston, MA 02111-1307, USA.
rpm-build 0fba15
rpm-build 0fba15
EXTRA_DIST += \
rpm-build 0fba15
	buildutil/tap-driver.sh \
rpm-build 0fba15
	buildutil/tap-test \
rpm-build 0fba15
	tests/glib.supp \
rpm-build 0fba15
	tests/ostree.supp \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
# We should probably consider flipping the default for DEBUG.  Also,
rpm-build 0fba15
# include the builddir in $PATH so we find our just-built ostree
rpm-build 0fba15
# binary.
rpm-build 0fba15
AM_TESTS_ENVIRONMENT += OT_TESTS_DEBUG=1 \
rpm-build 0fba15
  OSTREE_UNINSTALLED_SRCDIR=$(abs_top_srcdir) \
rpm-build 0fba15
	OSTREE_UNINSTALLED=$(abs_top_builddir) \
rpm-build 0fba15
	G_DEBUG=fatal-warnings \
rpm-build 0fba15
	GI_TYPELIB_PATH=$$(cd $(top_builddir) && pwd)$${GI_TYPELIB_PATH:+:$$GI_TYPELIB_PATH} \
rpm-build 0fba15
	LD_LIBRARY_PATH=$$(cd $(top_builddir)/.libs && pwd)$${LD_LIBRARY_PATH:+:$${LD_LIBRARY_PATH}} \
rpm-build 0fba15
	PATH=$$(cd $(top_builddir)/tests && pwd):$${PATH} \
rpm-build 0fba15
	OSTREE_FEATURES="$(OSTREE_FEATURES)" \
rpm-build 0fba15
	PYTHONUNBUFFERED=1 \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
if BUILDOPT_ASAN
rpm-build 0fba15
AM_TESTS_ENVIRONMENT += OT_SKIP_READDIR_RAND=1 G_SLICE=always-malloc
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
uninstalled_test_data = tests/ostree-symlink-stamp tests/ostree-prepare-root-symlink-stamp \
rpm-build 0fba15
			tests/ostree-remount-symlink-stamp
rpm-build 0fba15
rpm-build 0fba15
dist_uninstalled_test_scripts = tests/test-symbols.sh tests/coccinelle.sh
rpm-build 0fba15
rpm-build 0fba15
# This logic implements ENABLE_INSTALLED_TESTS_EXCLUSIVE; see below.
rpm-build 0fba15
# The goal here if installed tests are enabled, we explicitly make the
rpm-build 0fba15
# tests *only* run installed, to avoid having to run them twice in CI.
rpm-build 0fba15
# This overrides the glib-tap.mk emphasis on doing both, if we'd
rpm-build 0fba15
# used e.g. `dist_test_scripts`.
rpm-build 0fba15
dist_test_scripts = $(NULL)
rpm-build 0fba15
test_programs = \
rpm-build 0fba15
	tests/test-bloom \
rpm-build 0fba15
	tests/test-repo-finder-config \
rpm-build 0fba15
	tests/test-repo-finder-mount \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
_installed_or_uninstalled_test_scripts = \
rpm-build 0fba15
	tests/test-basic.sh \
rpm-build 0fba15
	tests/test-basic-user.sh \
rpm-build 0fba15
	tests/test-basic-user-only.sh \
rpm-build 0fba15
	tests/test-basic-root.sh \
rpm-build 0fba15
	tests/test-pull-subpath.sh \
rpm-build 0fba15
	tests/test-archivez.sh \
rpm-build 0fba15
	tests/test-remote-add.sh \
rpm-build 0fba15
	tests/test-remote-headers.sh \
rpm-build 0fba15
	tests/test-commit-sign.sh \
rpm-build 0fba15
	tests/test-export.sh \
rpm-build 0fba15
	tests/test-help.sh \
rpm-build 0fba15
	tests/test-libarchive.sh \
rpm-build 0fba15
	tests/test-parent.sh \
rpm-build 0fba15
	tests/test-pull-bare.sh \
rpm-build 0fba15
	tests/test-pull-bareuser.sh \
rpm-build 0fba15
	tests/test-pull-bareuseronly.sh \
rpm-build 0fba15
	tests/test-pull2-bareuseronly.sh \
rpm-build 0fba15
	tests/test-pull-commit-only.sh \
rpm-build 0fba15
	tests/test-pull-depth.sh \
rpm-build 0fba15
	tests/test-pull-mirror-summary.sh \
rpm-build 0fba15
	tests/test-pull-large-metadata.sh \
rpm-build 0fba15
	tests/test-pull-metalink.sh \
rpm-build 0fba15
	tests/test-pull-summary-sigs.sh \
rpm-build 0fba15
	tests/test-pull-resume.sh \
rpm-build 0fba15
	tests/test-pull-basicauth.sh \
rpm-build 0fba15
	tests/test-pull-repeated.sh \
rpm-build 0fba15
	tests/test-pull-sizes.sh \
rpm-build 0fba15
	tests/test-pull-untrusted.sh \
rpm-build 0fba15
	tests/test-pull-override-url.sh \
rpm-build 0fba15
	tests/test-pull-localcache.sh \
rpm-build 0fba15
	tests/test-local-pull.sh \
rpm-build 0fba15
	tests/test-local-pull-depth.sh \
rpm-build 0fba15
	tests/test-admin-upgrade-unconfigured.sh \
rpm-build 0fba15
	tests/test-admin-upgrade-endoflife.sh \
rpm-build 0fba15
	tests/test-admin-upgrade-systemd-update.sh \
rpm-build 0fba15
	tests/test-admin-deploy-syslinux.sh \
rpm-build 0fba15
	tests/test-admin-deploy-2.sh \
rpm-build 0fba15
	tests/test-admin-deploy-karg.sh \
rpm-build 0fba15
	tests/test-admin-deploy-switch.sh \
rpm-build 0fba15
	tests/test-admin-deploy-etcmerge-cornercases.sh \
rpm-build 0fba15
	tests/test-admin-deploy-uboot.sh \
rpm-build 0fba15
	tests/test-admin-deploy-grub2.sh \
rpm-build 0fba15
	tests/test-admin-deploy-nomerge.sh \
rpm-build 0fba15
	tests/test-admin-deploy-none.sh \
rpm-build 0fba15
	tests/test-admin-deploy-bootid-gc.sh \
Packit Service 6eb7b9
	tests/test-osupdate-dtb.sh \
rpm-build 0fba15
	tests/test-admin-instutil-set-kargs.sh \
rpm-build 0fba15
	tests/test-admin-upgrade-not-backwards.sh \
rpm-build 0fba15
	tests/test-admin-pull-deploy-commit.sh \
rpm-build 0fba15
	tests/test-admin-pull-deploy-split.sh \
rpm-build 0fba15
	tests/test-admin-locking.sh \
rpm-build 0fba15
	tests/test-admin-deploy-clean.sh \
rpm-build 0fba15
	tests/test-reset-nonlinear.sh \
rpm-build 0fba15
	tests/test-oldstyle-partial.sh \
rpm-build 0fba15
	tests/test-delta.sh \
Packit Service 6eb7b9
	tests/test-delta-sign.sh \
Packit Service 6eb7b9
	tests/test-delta-ed25519.sh \
rpm-build 0fba15
	tests/test-xattrs.sh \
rpm-build 0fba15
	tests/test-auto-summary.sh \
rpm-build 0fba15
	tests/test-prune.sh \
rpm-build 0fba15
	tests/test-concurrency.py \
rpm-build 0fba15
	tests/test-refs.sh \
rpm-build 0fba15
	tests/test-demo-buildsystem.sh \
rpm-build 0fba15
	tests/test-switchroot.sh \
rpm-build 0fba15
	tests/test-pull-contenturl.sh \
rpm-build 0fba15
	tests/test-pull-mirrorlist.sh \
rpm-build 0fba15
	tests/test-summary-update.sh \
rpm-build 0fba15
	tests/test-summary-view.sh \
rpm-build 0fba15
	tests/test-no-initramfs.sh \
rpm-build 0fba15
	tests/test-create-usb.sh \
rpm-build 0fba15
	tests/test-find-remotes.sh \
rpm-build 0fba15
	tests/test-fsck-collections.sh \
rpm-build 0fba15
	tests/test-fsck-delete.sh \
rpm-build 0fba15
	tests/test-init-collections.sh \
rpm-build 0fba15
	tests/test-prune-collections.sh \
rpm-build 0fba15
	tests/test-refs-collections.sh \
rpm-build 0fba15
	tests/test-remote-add-collections.sh \
rpm-build 0fba15
	tests/test-repo-finder-mount-integration.sh \
rpm-build 0fba15
	tests/test-summary-collections.sh \
rpm-build 0fba15
	tests/test-pull-collections.sh \
rpm-build 0fba15
	tests/test-config.sh \
rpm-build 0fba15
	tests/test-signed-commit.sh \
rpm-build 0fba15
	tests/test-signed-pull.sh \
rpm-build 0fba15
	tests/test-pre-signed-pull.sh \
rpm-build 0fba15
	tests/test-signed-pull-summary.sh \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
if USE_GPGME
rpm-build 0fba15
_installed_or_uninstalled_test_scripts += \
rpm-build 0fba15
	tests/test-remote-gpg-import.sh \
rpm-build 0fba15
	tests/test-gpg-signed-commit.sh \
rpm-build 0fba15
	tests/test-admin-gpg.sh \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
experimental_test_scripts = \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
test_extra_programs = \
rpm-build 0fba15
	tests/get-byte-order \
rpm-build 0fba15
	tests/repo-finder-mount \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
tests_get_byte_order_SOURCES = tests/get-byte-order.c
rpm-build 0fba15
tests_get_byte_order_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS)
rpm-build 0fba15
tests_get_byte_order_LDADD = $(GLIB_LIBS)
rpm-build 0fba15
rpm-build 0fba15
tests_repo_finder_mount_SOURCES = tests/repo-finder-mount.c
rpm-build 0fba15
tests_repo_finder_mount_CFLAGS = $(common_tests_cflags)
rpm-build 0fba15
tests_repo_finder_mount_LDADD = $(common_tests_ldadd) libostreetest.la
rpm-build 0fba15
rpm-build 0fba15
if ENABLE_EXPERIMENTAL_API
rpm-build 0fba15
_installed_or_uninstalled_test_scripts += $(experimental_test_scripts)
rpm-build 0fba15
else
rpm-build 0fba15
EXTRA_DIST += $(experimental_test_scripts)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
if BUILDOPT_FUSE
rpm-build 0fba15
_installed_or_uninstalled_test_scripts += tests/test-rofiles-fuse.sh
rpm-build 0fba15
uninstalled_test_data += tests/rofiles-fuse-symlink-stamp
rpm-build 0fba15
else
rpm-build 0fba15
EXTRA_DIST += tests/test-rofiles-fuse.sh
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
if USE_LIBSOUP
rpm-build 0fba15
_installed_or_uninstalled_test_scripts += tests/test-remote-cookies.sh
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
# These call into gjs scripts
rpm-build 0fba15
js_tests = tests/test-corruption.sh tests/test-pull-corruption.sh
rpm-build 0fba15
if BUILDOPT_GJS
rpm-build 0fba15
_installed_or_uninstalled_test_scripts += $(js_tests)
rpm-build 0fba15
else
rpm-build 0fba15
EXTRA_DIST += $(js_tests)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
dist_installed_test_data = tests/archive-test.sh \
rpm-build 0fba15
	tests/pull-test.sh \
rpm-build 0fba15
	tests/pull-test2.sh \
rpm-build 0fba15
	tests/admin-test.sh \
rpm-build 0fba15
	tests/basic-test.sh \
rpm-build 0fba15
	tests/pre-endian-deltas-repo-big.tar.xz \
rpm-build 0fba15
	tests/pre-endian-deltas-repo-little.tar.xz \
rpm-build 0fba15
	tests/fah-deltadata-old.tar.xz \
rpm-build 0fba15
	tests/fah-deltadata-new.tar.xz \
rpm-build 0fba15
	tests/ostree-path-traverse.tar.gz \
rpm-build 0fba15
	tests/pre-signed-pull-data.tar.gz \
rpm-build 0fba15
	tests/libtest-core.sh \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
EXTRA_DIST += tests/libtest.sh
rpm-build 0fba15
rpm-build 0fba15
dist_test_extra_scripts = \
rpm-build 0fba15
	tests/bootloader-entries-crosscheck.py \
rpm-build 0fba15
	tests/corrupt-repo-ref.js \
rpm-build 0fba15
	tests/ostree-grub-generator \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
if USE_GPGME
rpm-build 0fba15
# We can't use nobase_ as we need to strip off the tests/, can't
rpm-build 0fba15
# use plain installed_ as we do need the gpghome/ prefix.
rpm-build 0fba15
if ENABLE_INSTALLED_TESTS
rpm-build 0fba15
gpginsttestdir = $(installed_testdir)/gpghome
rpm-build 0fba15
dist_gpginsttest_DATA = tests/gpghome/secring.gpg \
rpm-build 0fba15
	tests/gpghome/pubring.gpg \
rpm-build 0fba15
	tests/gpghome/trustdb.gpg \
rpm-build 0fba15
	tests/gpghome/key1.asc \
rpm-build 0fba15
	tests/gpghome/key2.asc \
rpm-build 0fba15
	tests/gpghome/key3.asc
rpm-build 0fba15
gpginsttest_trusteddir = $(installed_testdir)/gpghome/trusted
rpm-build 0fba15
dist_gpginsttest_trusted_DATA = tests/gpghome/trusted/pubring.gpg
rpm-build 0fba15
gpginsttest_revocdir = $(installed_testdir)/gpghome/revocations
rpm-build 0fba15
dist_gpginsttest_revoc_DATA = \
rpm-build 0fba15
	tests/gpghome/revocations/key1.rev \
rpm-build 0fba15
	tests/gpghome/revocations/key2.rev \
rpm-build 0fba15
	tests/gpghome/revocations/key3.rev \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
gpgvinsttestdir = $(installed_testdir)/gpg-verify-data
rpm-build 0fba15
dist_gpgvinsttest_DATA = $(addprefix tests/gpg-verify-data/, \
rpm-build 0fba15
	gpg.conf lgpl2 lgpl2.sig lgpl2.sig0 lgpl2.sig1 lgpl2.sig2 lgpl2.sig3 \
rpm-build 0fba15
	lgpl2.sig4 pubring.gpg secring.gpg trustdb.gpg)
rpm-build 0fba15
endif
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
js_installed_tests = \
rpm-build 0fba15
	tests/test-core.js \
rpm-build 0fba15
	tests/test-remotes-config-dir.js \
rpm-build 0fba15
	tests/test-sizes.js \
rpm-build 0fba15
	tests/test-sysroot.js \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
if BUILDOPT_GJS
rpm-build 0fba15
_installed_or_uninstalled_test_scripts += $(js_installed_tests)
rpm-build 0fba15
else
rpm-build 0fba15
EXTRA_DIST += $(js_installed_tests)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
test_ltlibraries = libreaddir-rand.la
rpm-build 0fba15
libreaddir_rand_la_SOURCES = tests/readdir-rand.c
rpm-build 0fba15
libreaddir_rand_la_CFLAGS = $(AM_CFLAGS) $(OT_INTERNAL_GIO_UNIX_CFLAGS)
rpm-build 0fba15
libreaddir_rand_la_LIBADD = \
rpm-build 0fba15
	-ldl \
rpm-build 0fba15
	$(OT_INTERNAL_GIO_UNIX_LIBS) \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
libreaddir_rand_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
rpm-build 0fba15
if !ENABLE_INSTALLED_TESTS
rpm-build 0fba15
libreaddir_rand_la_LDFLAGS += -rpath $(abs_builddir)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
_installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
rpm-build 0fba15
	tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \
rpm-build 0fba15
	tests/test-checksum tests/test-lzma tests/test-rollsum \
rpm-build 0fba15
	tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h tests/test-kargs
rpm-build 0fba15
rpm-build 0fba15
if USE_GPGME
rpm-build 0fba15
_installed_or_uninstalled_test_programs += \
rpm-build 0fba15
	tests/test-gpg-verify-result \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
if USE_AVAHI
rpm-build 0fba15
test_programs += tests/test-repo-finder-avahi
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
# An interactive tool
rpm-build 0fba15
noinst_PROGRAMS += tests/test-rollsum-cli
rpm-build 0fba15
rpm-build 0fba15
if USE_LIBARCHIVE
rpm-build 0fba15
_installed_or_uninstalled_test_programs += tests/test-libarchive-import
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
common_tests_cflags = $(ostree_bin_shared_cflags) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/libglnx
rpm-build 0fba15
common_tests_ldadd = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_GIO_UNIX_LIBS)
rpm-build 0fba15
rpm-build 0fba15
noinst_LTLIBRARIES += libostreetest.la
rpm-build 0fba15
libostreetest_la_SOURCES = tests/libostreetest.c tests/test-mock-gio.c tests/test-mock-gio.h
rpm-build 0fba15
libostreetest_la_CFLAGS = $(common_tests_cflags) -I $(srcdir)/tests
rpm-build 0fba15
libostreetest_la_LIBADD = $(common_tests_ldadd)
rpm-build 0fba15
rpm-build 0fba15
TESTS_CFLAGS = $(common_tests_cflags)
rpm-build 0fba15
TESTS_LDADD = $(common_tests_ldadd) libostreetest.la
rpm-build 0fba15
rpm-build 0fba15
tests_test_rollsum_cli_SOURCES = src/libostree/ostree-rollsum.c tests/test-rollsum-cli.c
rpm-build 0fba15
tests_test_rollsum_cli_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_ZLIB_CFLAGS)
rpm-build 0fba15
tests_test_rollsum_cli_LDADD = $(bupsplitpath) $(TESTS_LDADD) $(OT_DEP_ZLIB_LIBS)
rpm-build 0fba15
rpm-build 0fba15
tests_test_rollsum_SOURCES = src/libostree/ostree-rollsum.c tests/test-rollsum.c
rpm-build 0fba15
tests_test_rollsum_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_ZLIB_CFLAGS)
rpm-build 0fba15
tests_test_rollsum_LDADD = $(bupsplitpath) $(TESTS_LDADD) $(OT_DEP_ZLIB_LIBS)
rpm-build 0fba15
rpm-build 0fba15
tests_test_bloom_SOURCES = src/libostree/ostree-bloom.c tests/test-bloom.c
rpm-build 0fba15
tests_test_bloom_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_bloom_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_include_ostree_h_SOURCES = tests/test-include-ostree-h.c
rpm-build 0fba15
# Don't use TESTS_CFLAGS so we test if the public header can be included by external programs
rpm-build 0fba15
tests_test_include_ostree_h_CFLAGS = $(AM_CFLAGS) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/src/libostree -I$(builddir)/src/libostree
rpm-build 0fba15
# Don't define OSTREE_COMPILATION so that we're compiling as if it's an external program
rpm-build 0fba15
tests_test_include_ostree_h_CPPFLAGS = $(AM_CPPFLAGS) -UOSTREE_COMPILATION
rpm-build 0fba15
tests_test_include_ostree_h_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
if USE_AVAHI
rpm-build 0fba15
tests_test_repo_finder_avahi_SOURCES = src/libostree/ostree-repo-finder-avahi-parser.c tests/test-repo-finder-avahi.c
rpm-build 0fba15
tests_test_repo_finder_avahi_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_repo_finder_avahi_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
tests_test_kargs_SOURCES = src/libostree/ostree-kernel-args.c tests/test-kargs.c
rpm-build 0fba15
tests_test_kargs_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_kargs_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_repo_finder_config_SOURCES = tests/test-repo-finder-config.c
rpm-build 0fba15
tests_test_repo_finder_config_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_repo_finder_config_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_repo_finder_mount_SOURCES = tests/test-repo-finder-mount.c
rpm-build 0fba15
tests_test_repo_finder_mount_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_repo_finder_mount_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_mutable_tree_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_mutable_tree_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_basic_c_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_basic_c_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_sysroot_c_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_sysroot_c_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_pull_c_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_pull_c_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_repo_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_repo_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_ot_unix_utils_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_ot_unix_utils_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_varint_SOURCES = src/libostree/ostree-varint.c tests/test-varint.c
rpm-build 0fba15
tests_test_varint_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_varint_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_bsdiff_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_bsdiff_LDADD = libbsdiff.la $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_checksum_SOURCES = \
rpm-build 0fba15
	src/libostree/ostree-core.c \
rpm-build 0fba15
	src/libostree/ostree-varint.c \
rpm-build 0fba15
	tests/test-checksum.c
rpm-build 0fba15
tests_test_checksum_CFLAGS = $(TESTS_CFLAGS) $(libglnx_cflags)
rpm-build 0fba15
tests_test_checksum_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_libarchive_import_SOURCES = tests/test-libarchive-import.c
rpm-build 0fba15
tests_test_libarchive_import_CFLAGS = $(TESTS_CFLAGS) $(libglnx_cflags) $(OT_DEP_LIBARCHIVE_CFLAGS)
rpm-build 0fba15
tests_test_libarchive_import_LDADD = $(TESTS_LDADD) $(OT_DEP_LIBARCHIVE_LIBS)
rpm-build 0fba15
rpm-build 0fba15
tests_test_keyfile_utils_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_keyfile_utils_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_ot_opt_utils_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_ot_opt_utils_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_ot_tool_util_CFLAGS = $(TESTS_CFLAGS)
rpm-build 0fba15
tests_test_ot_tool_util_LDADD = $(TESTS_LDADD)
rpm-build 0fba15
rpm-build 0fba15
tests_test_lzma_SOURCES = src/libostree/ostree-lzma-common.c src/libostree/ostree-lzma-compressor.c \
rpm-build 0fba15
	src/libostree/ostree-lzma-decompressor.c tests/test-lzma.c
rpm-build 0fba15
tests_test_lzma_CFLAGS = $(TESTS_CFLAGS) $(OT_DEP_LZMA_CFLAGS)
rpm-build 0fba15
tests_test_lzma_LDADD = $(TESTS_LDADD) $(OT_DEP_LZMA_LIBS)
rpm-build 0fba15
rpm-build 0fba15
if USE_GPGME
rpm-build 0fba15
tests_test_gpg_verify_result_SOURCES = \
rpm-build 0fba15
	src/libostree/ostree-gpg-verify-result-private.h \
rpm-build 0fba15
	tests/test-gpg-verify-result.c
rpm-build 0fba15
tests_test_gpg_verify_result_CFLAGS = $(TESTS_CFLAGS) $(OT_INTERNAL_GPGME_CFLAGS)
rpm-build 0fba15
tests_test_gpg_verify_result_LDADD = $(TESTS_LDADD) $(OT_INTERNAL_GPGME_LIBS)
rpm-build 0fba15
rpm-build 0fba15
EXTRA_DIST += \
rpm-build 0fba15
	tests/gpg-verify-data/README.md \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
EXTRA_DIST += \
rpm-build 0fba15
	tests/libostreetest.h \
rpm-build 0fba15
	tests/libtest.sh \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
tests/libreaddir-rand.so: Makefile
rpm-build 0fba15
	mkdir -p tests/
rpm-build 0fba15
	$(AM_V_GEN) ln -fns ../.libs/libreaddir-rand.so tests/
rpm-build 0fba15
ALL_LOCAL_RULES += tests/libreaddir-rand.so
rpm-build 0fba15
CLEANFILES += tests/libreaddir-rand.so tests/ostree-symlink-stamp \
rpm-build 0fba15
		tests/ostree-prepare-root-symlink-stamp tests/ostree-remount-symlink-stamp \
rpm-build 0fba15
		tests/rofiles-fuse-symlink-stamp tests/ostree
rpm-build 0fba15
CLEANFILES += tests/ostree-prepare-root tests/ostree-remount tests/rofiles-fuse
rpm-build 0fba15
rpm-build 0fba15
tests/%-symlink-stamp: % Makefile
rpm-build 0fba15
	$(AM_V_GEN) set -e; \
rpm-build 0fba15
	lt_bin=`cd $(top_builddir) && ./libtool --mode=execute echo $*`; \
rpm-build 0fba15
	if test "$${lt_bin}" = "$*"; then \
rpm-build 0fba15
		real_bin=$(abs_top_builddir)/$*; \
rpm-build 0fba15
	else \
rpm-build 0fba15
		real_bin="$${lt_bin}"; \
rpm-build 0fba15
	fi; \
rpm-build 0fba15
	ln -sf "$${real_bin}" tests/$*; \
rpm-build 0fba15
	touch $@
rpm-build 0fba15
rpm-build 0fba15
# See above comment on binding the tests to be either installed or not.
rpm-build 0fba15
if ENABLE_INSTALLED_TESTS_EXCLUSIVE
rpm-build 0fba15
dist_installed_test_scripts = $(_installed_or_uninstalled_test_scripts)
rpm-build 0fba15
installed_test_programs = $(_installed_or_uninstalled_test_programs)
rpm-build 0fba15
check-local:
rpm-build 0fba15
	echo "NOTE: Exclusive installed tests are enabled; to run them, make install, then: gnome-desktop-testing-runner -p 0 libostree/"
rpm-build 0fba15
else
rpm-build 0fba15
dist_test_scripts += $(_installed_or_uninstalled_test_scripts)
rpm-build 0fba15
test_programs += $(_installed_or_uninstalled_test_programs)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
if !USE_LIBSOUP
rpm-build 0fba15
no-soup-for-you-warning:
rpm-build 0fba15
	@echo "WARNING: $(PACKAGE) was built without libsoup, which is currently" 1>&2
rpm-build 0fba15
	@echo "WARNING: required for many unit tests." 1>&2
rpm-build 0fba15
	sleep 10
rpm-build 0fba15
check: no-soup-for-you-warning
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
# Unfortunately the glib test data APIs don't actually handle
rpm-build 0fba15
# non-recursive Automake, so we change our code to canonically look
rpm-build 0fba15
# for tests/ which is just a symlink when installed.
rpm-build 0fba15
if ENABLE_INSTALLED_TESTS
rpm-build 0fba15
install-installed-tests-extra:
rpm-build 0fba15
	if test -L $(DESTDIR)$(installed_testdir)/tests; then \
rpm-build 0fba15
	  rm $(DESTDIR)$(installed_testdir)/tests; \
rpm-build 0fba15
	fi
rpm-build 0fba15
	ln -s . $(DESTDIR)$(installed_testdir)/tests
rpm-build 0fba15
if BUILDOPT_ASAN
rpm-build 0fba15
	sed -e 's,^BUILT_WITH_ASAN=.*,BUILT_WITH_ASAN=1,' < $(srcdir)/tests/libtest.sh > $(DESTDIR)$(installed_testdir)/tests/libtest.sh
rpm-build 0fba15
else
rpm-build 0fba15
	install -m 0644 $(srcdir)/tests/libtest.sh $(DESTDIR)$(installed_testdir)/tests/libtest.sh
rpm-build 0fba15
endif
rpm-build 0fba15
INSTALL_DATA_HOOKS += install-installed-tests-extra
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
# Just forward these
rpm-build 0fba15
build-kola-tests:
rpm-build 0fba15
	$(MAKE) -C tests/kola
rpm-build 0fba15
rpm-build 0fba15
install-kola-tests:
rpm-build 0fba15
	$(MAKE) -C tests/kola install