rpm-ostree/Makefile-tests.am
Colin Walters 7b45f13a62 Link lib/ against libpriv/, use it to share sack loading function
On the plus side, we share some code between the library and the
binary now.  On the downside, because `librpmostreepriv.la` is a
noinst library, its code text is duplicated between the shared library
and binary, at least until we either:

 - Have the binary solely use the public shared library (like ostree does)
 - Install `librpmostreepriv.so` to e.g. `/usr/lib64/rpm-ostree/librpmostreepriv.so`
   without the headers being public
2015-04-23 16:30:17 -04:00

57 lines
2.0 KiB
Plaintext

include $(top_srcdir)/buildutil/glib-tap.mk
CLEANFILES += \
tests/compose/yum/empty tests/compose/yum/repodata/repomd.xml \
tests/compose/test-repo.repo \
tests/compose/yum/repodata/*.bz2 \
tests/compose/yum/repodata/*.gz \
$(NULL)
# Needed by the compose test
tests/compose/yum/empty: tests/compose/yum/empty.c
$(CC) -nostdlib $< -o $@
tests/compose/yum/repodata/repomd.xml: tests/compose/yum/empty tests/compose/yum/empty.spec
(cd tests/compose/yum && \
rpmbuild --define "_sourcedir $(shell pwd)/tests/compose/yum" --define "_specdir $(shell pwd)/tests/compose/yum" --define "_builddir $(shell pwd)/tests/compose/yum" \
--define "_srcrpmdir $(shell pwd)/tests/compose/yum" --define "_rpmdir $(shell pwd)/tests/compose/yum" --define "_buildrootdir $(shell pwd)/tests/compose/yum/.build" \
-ba empty.spec && createrepo --database $(shell pwd)/tests/compose/yum/)
tests/compose/test-repo.repo: tests/compose/test-repo.repo.in tests/compose/yum/repodata/repomd.xml
cat $< | sed -e "s|%WHERE%|$(installed_testdir)|" > $@
tests_jsonutil_CPPFLAGS = -I $(srcdir)/src/libpriv
tests_jsonutil_CFLAGS = $(PKGDEP_RPMOSTREE_CFLAGS)
tests_jsonutil_LDADD = $(PKGDEP_RPMOSTREE_LIBS) librpmostreepriv.la
tests/test-compose.sh: tests/compose/test-repo.repo
installed_test_data = tests/libtest.sh \
tests/compose/test-repo.repo \
tests/compose/test-repo.json \
tests/compose/test-repo-no-selinux-tag.json \
tests/compose/test-repo.repo.in \
$(NULL)
nobase_installed_test_DATA += $(shell find tests/compose/yum/ -type f) \
$(NULL)
installed_test_scripts = \
tests/test-compose.sh \
tests/test-compose-no-selinux-tag.sh \
tests/test-basic.sh \
$(NULL)
test_programs = \
tests/jsonutil \
$(NULL)
check-local:
@echo " *** NOTE ***"
@echo " *** NOTE ***"
@echo " \"make check\" only runs a subset of rpm-ostree's tests."
@echo " The other tests use: use https://live.gnome.org/GnomeGoals/InstalledTests"
@echo " To run them, ostree must be configured with --enable-installed-tests and installed"
@echo " *** NOTE ***"
@echo " *** NOTE ***"