Makefile-tests.am: add helper testenv target

The 'testenv' target enters an environment in which a tmpdir is created
and the daemon is set up and started. This is useful for easy testing.

$ make -j4 && make install
$ make testenv
===== ENTERING TESTENV =====
$ # now we can easily test our new code
$ # we can even make use of helper funcs
$ source ../tests/libtest.sh
$ setup_os_repository archive-z2 syslinux
$ exit
===== EXITING TESTENV =====
This commit is contained in:
Jonathan Lebon 2016-02-26 11:31:33 -05:00
parent 657f48377b
commit b129df69dc

View File

@ -78,3 +78,12 @@ check-local:
@echo " To run them, rpm-ostree must be configured with --enable-installed-tests and installed"
@echo " *** NOTE ***"
@echo " *** NOTE ***"
testenv:
@echo "===== ENTERING TESTENV ====="
test_tmpdir=$$(mktemp -d test.XXXXXX) && \
cd $$test_tmpdir && \
sh ../tests/setup-session.sh bash && \
cd .. && \
rm -rf $$test_tmpdir
@echo "===== LEAVING TESTENV ====="