2014-12-18 02:11:47 +03:00
include $(top_srcdir)/buildutil/glib-tap.mk
2014-07-16 17:02:45 +04:00
2016-02-10 13:42:57 +03:00
AM_TESTS_ENVIRONMENT = UNINSTALLEDTESTS=1 builddir=$(abs_builddir)
2015-04-22 12:10:53 +03:00
CLEANFILES += \
2016-06-06 19:08:29 +03:00
tests/compose/yum/empty \
tests/compose/yum/repodata/repomd.xml \
2015-04-22 12:10:53 +03:00
tests/compose/test-repo.repo \
tests/compose/yum/repodata/*.bz2 \
tests/compose/yum/repodata/*.gz \
$(NULL)
2015-03-23 14:23:29 +03:00
# 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 && \
2016-06-06 19:08:29 +03:00
rpmbuild \
--define "_sourcedir $(abs_top_srcdir)/tests/compose/yum" \
--define "_specdir $(abs_top_srcdir)/tests/compose/yum" \
--define "_builddir $(abs_top_srcdir)/tests/compose/yum" \
--define "_srcrpmdir $(abs_top_srcdir)/tests/compose/yum" \
--define "_rpmdir $(abs_top_srcdir)/tests/compose/yum" \
--define "_buildrootdir $(abs_top_srcdir)/tests/compose/yum/.build" \
-ba empty.spec && \
rm *.src.rpm && \
createrepo_c --no-database $(abs_top_srcdir)/tests/compose/yum/)
2015-03-23 14:23:29 +03:00
tests/compose/test-repo.repo: tests/compose/test-repo.repo.in tests/compose/yum/repodata/repomd.xml
2016-06-06 19:08:29 +03:00
cat $< | sed -e "s|%WHERE%|$(abs_top_srcdir)|" > $@
2016-02-24 01:50:07 +03:00
2016-03-10 22:36:44 +03:00
CLEANFILES += tests/compose/test-repo-local.repo \
tests/compose/yum/empty-1.0-1.src.rpm \
$(NULL)
2015-04-07 03:18:50 +03:00
tests_jsonutil_CPPFLAGS = -I $(srcdir)/src/libpriv
2014-12-18 04:26:31 +03:00
tests_jsonutil_CFLAGS = $(PKGDEP_RPMOSTREE_CFLAGS)
2015-04-17 21:03:24 +03:00
tests_jsonutil_LDADD = $(PKGDEP_RPMOSTREE_LIBS) librpmostreepriv.la
2014-07-16 17:02:45 +04:00
2015-03-23 14:23:29 +03:00
tests/test-compose.sh: tests/compose/test-repo.repo
2016-06-06 19:08:29 +03:00
tests/test-ucontainer.sh: tests/compose/test-repo.repo
2015-09-01 21:46:32 +03:00
2016-06-06 19:08:29 +03:00
uninstalled_test_programs = \
tests/jsonutil \
2014-07-16 17:02:45 +04:00
$(NULL)
2014-12-18 04:26:31 +03:00
2016-06-06 19:08:29 +03:00
uninstalled_test_scripts = \
tests/test-basic.sh \
tests/test-compose.sh \
tests/test-ucontainer.sh \
2014-12-18 04:26:31 +03:00
$(NULL)
2015-03-28 15:47:25 +03:00
2016-06-06 19:08:29 +03:00
uninstalled_test_extra_programs = dbus-run-session
2016-02-10 13:42:57 +03:00
2015-09-08 18:06:25 +03:00
dbus_run_session_SOURCES = tests/dbus-run-session.c
2015-03-28 15:47:25 +03:00
check-local:
@echo " *** NOTE ***"
@echo " *** NOTE ***"
@echo " \"make check\" only runs a subset of rpm-ostree's tests."
2016-06-06 19:08:29 +03:00
@echo " Use \"make vmcheck\" to run remaining tests in a VM."
2015-03-28 15:47:25 +03:00
@echo " *** NOTE ***"
@echo " *** NOTE ***"
2016-02-26 19:31:33 +03:00
testenv:
@echo "===== ENTERING TESTENV ====="
test_tmpdir=$$(mktemp -d test.XXXXXX) && \
cd $$test_tmpdir && \
2016-05-24 19:17:14 +03:00
TESTENV=1 sh ../tests/setup-session.sh bash && \
2016-02-26 19:31:33 +03:00
cd .. && \
rm -rf $$test_tmpdir
@echo "===== LEAVING TESTENV ====="