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

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 SUBDIRS = man lib scripts daemons doc test tools qa
EXTRA_DIST = NEWS EXTRA_DIST = NEWS
.PHONY: ganeti
ganeti:
cd $(top_builddir) && rm -f $@ && $(LN_S) lib $@
pre-check: ganeti
$(MAKE) -C lib $@
# custom rules # custom rules
depgraph: depgraph.png depgraph: depgraph.png
......
# Configure script for Ganeti # Configure script for Ganeti
AC_PREREQ(2.59) AC_PREREQ(2.59)
AC_INIT(ganeti, 1.2b2, ganeti@googlegroups.com) AC_INIT(ganeti, 1.2b2, ganeti@googlegroups.com)
AC_CONFIG_AUX_DIR(autotools) AC_CONFIG_AUX_DIR(autotools)
AC_CONFIG_SRCDIR(configure)
AM_INIT_AUTOMAKE([foreign tar-ustar]) AM_INIT_AUTOMAKE([foreign tar-ustar])
# --with-ssh-initscript=... # --with-ssh-initscript=...
...@@ -35,6 +35,7 @@ AC_SUBST(OS_SEARCH_PATH, $os_search_path) ...@@ -35,6 +35,7 @@ AC_SUBST(OS_SEARCH_PATH, $os_search_path)
# Check common programs # Check common programs
AC_PROG_INSTALL AC_PROG_INSTALL
AC_PROG_LN_S
# Check for Python # Check for Python
AM_PATH_PYTHON(2.4) AM_PATH_PYTHON(2.4)
......
...@@ -19,3 +19,8 @@ _autoconf.py: Makefile ...@@ -19,3 +19,8 @@ _autoconf.py: Makefile
echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \ echo "EXPORT_DIR = '$(EXPORT_DIR)'"; \
echo "OS_SEARCH_PATH = [$(OS_SEARCH_PATH)]"; \ 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 = \
TESTS_ENVIRONMENT = PYTHONPATH=.:$(srcdir) ganeti.config_unittest.py \
ganeti.hooks_unittest.py \
ganeti.utils_unittest.py
TESTS_ENVIRONMENT = PYTHONPATH=.:$(top_builddir)
check_DATA = ganeti check-am: do-pre-check
ganeti:
rm -f ganeti do-pre-check:
ln -s $(top_srcdir)/lib ganeti $(MAKE) -C $(top_builddir) pre-check
EXTRA_DIST = $(TESTS) mocks.py EXTRA_DIST = $(TESTS) mocks.py
CLEANFILES = *.py[co] 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