rpm-ostree/Makefile-tests.am
Jonathan Lebon acd3c8ff41 tests: restructure dirs
- Move all the uninstalled, non-destructive tests to check/
- Add a README
- Move utilities to utils/
- Move common files to common/

Closes: #304
Approved by: cgwalters
2016-06-06 21:14:07 +00:00

80 lines
2.6 KiB
Plaintext

include $(top_srcdir)/buildutil/glib-tap.mk
AM_TESTS_ENVIRONMENT = \
UNINSTALLEDTESTS=1 \
builddir=$(abs_builddir) \
topsrcdir=$(abs_top_srcdir) \
commondir=$(abs_top_srcdir)/tests/common
CLEANFILES += \
tests/common/compose/yum/empty \
tests/common/compose/yum/repodata/repomd.xml \
tests/common/compose/test-repo.repo \
tests/common/compose/yum/repodata/*.bz2 \
tests/common/compose/yum/repodata/*.gz \
$(NULL)
# Needed by the compose test
tests/common/compose/yum/empty: tests/common/compose/yum/empty.c
$(CC) -nostdlib $< -o $@
tests/common/compose/yum/repodata/repomd.xml: tests/common/compose/yum/empty tests/common/compose/yum/empty.spec
(cd tests/common/compose/yum && \
rpmbuild \
--define "_sourcedir $(abs_top_srcdir)/tests/common/compose/yum" \
--define "_specdir $(abs_top_srcdir)/tests/common/compose/yum" \
--define "_builddir $(abs_top_srcdir)/tests/common/compose/yum" \
--define "_srcrpmdir $(abs_top_srcdir)/tests/common/compose/yum" \
--define "_rpmdir $(abs_top_srcdir)/tests/common/compose/yum" \
--define "_buildrootdir $(abs_top_srcdir)/tests/common/compose/yum/.build" \
-ba empty.spec && \
rm *.src.rpm && \
createrepo_c --no-database $(abs_top_srcdir)/tests/common/compose/yum/)
tests/common/compose/test-repo.repo: tests/common/compose/test-repo.repo.in tests/common/compose/yum/repodata/repomd.xml
cat $< | sed -e "s|%WHERE%|$(abs_top_srcdir)|" > $@
CLEANFILES += \
tests/common/compose/test-repo-local.repo \
tests/common/compose/yum/empty-1.0-1.src.rpm \
$(NULL)
tests_check_jsonutil_CPPFLAGS = -I $(srcdir)/src/libpriv
tests_check_jsonutil_CFLAGS = $(PKGDEP_RPMOSTREE_CFLAGS)
tests_check_jsonutil_LDADD = $(PKGDEP_RPMOSTREE_LIBS) librpmostreepriv.la
tests/check/test-compose.sh: tests/common/compose/test-repo.repo
tests/check/test-ucontainer.sh: tests/common/compose/test-repo.repo
uninstalled_test_programs = \
tests/check/jsonutil \
$(NULL)
uninstalled_test_scripts = \
tests/check/test-basic.sh \
tests/check/test-compose.sh \
tests/check/test-ucontainer.sh \
$(NULL)
uninstalled_test_extra_programs = dbus-run-session
dbus_run_session_SOURCES = tests/utils/dbus-run-session.c
check-local:
@echo " *** NOTE ***"
@echo " *** NOTE ***"
@echo " \"make check\" only runs a subset of rpm-ostree's tests."
@echo " Use \"make vmcheck\" to run remaining tests in a VM."
@echo " *** NOTE ***"
@echo " *** NOTE ***"
testenv:
@echo "===== ENTERING TESTENV ====="
test_tmpdir=$$(mktemp -d test.XXXXXX) && \
cd $$test_tmpdir && \
TESTENV=1 sh ../tests/utils/setup-session.sh bash && \
cd .. && \
rm -rf $$test_tmpdir
@echo "===== LEAVING TESTENV ====="