Commit 9ff7e35c authored by Michael Hanselmann's avatar Michael Hanselmann

Fix “make distcheck”.

- Move symlink to “ganeti” to top dir
- Add ganeti.config_unittest.py to tests to be run
- Make sure everything is built before tests are run

Reviewed-by: iustinp
parent eedbda4b
# standard automake rules
SUBDIRS = man lib scripts daemons doc test tools qa
EXTRA_DIST = NEWS
.PHONY: ganeti
ganeti:
cd $(top_builddir) && rm -f $@ && $(LN_S) lib $@
pre-check: ganeti
$(MAKE) -C lib $@
# custom rules
depgraph: depgraph.png
......
# Configure script for Ganeti
AC_PREREQ(2.59)
AC_INIT(ganeti, 1.2b2, ganeti@googlegroups.com)
AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_SRCDIR(configure)
AM_INIT_AUTOMAKE([foreign tar-ustar])
# --with-ssh-initscript=...
......@@ -35,6 +35,7 @@ AC_SUBST(OS_SEARCH_PATH, $os_search_path)
# Check common programs
AC_PROG_INSTALL
AC_PROG_LN_S
# Check for Python
AM_PATH_PYTHON(2.4)
......
......@@ -19,3 +19,8 @@ _autoconf.py: Makefile
echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \
} > $@
pre-check: all
for i in $(pkgpython_PYTHON); do \
if test ! -f $$i; then $(LN_S) $(srcdir)/$$i $$i; fi; \
done
TESTS = ganeti.hooks_unittest.py ganeti.utils_unittest.py
TESTS_ENVIRONMENT = PYTHONPATH=.:$(srcdir)
TESTS = \
ganeti.config_unittest.py \
ganeti.hooks_unittest.py \
ganeti.utils_unittest.py
TESTS_ENVIRONMENT = PYTHONPATH=.:$(top_builddir)
check_DATA = ganeti
ganeti:
rm -f ganeti
ln -s $(top_srcdir)/lib ganeti
check-am: do-pre-check
do-pre-check:
$(MAKE) -C $(top_builddir) pre-check
EXTRA_DIST = $(TESTS) mocks.py
CLEANFILES = *.py[co]
MAINTAINERCLEANFILES = ganeti
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment