Add more mon-collector shell tests
[ganeti-local] / Makefile.am
index c7865e6..713abd8 100644 (file)
@@ -455,6 +455,7 @@ HS_LIB_SRCS = \
        htools/Ganeti/Confd/Utils.hs \
        htools/Ganeti/Config.hs \
        htools/Ganeti/Daemon.hs \
+       htools/Ganeti/DataCollectors/CLI.hs \
        htools/Ganeti/DataCollectors/Drbd.hs \
        htools/Ganeti/DataCollectors/Program.hs \
        htools/Ganeti/Errors.hs \
@@ -512,6 +513,7 @@ HS_TEST_SRCS = \
        htest/Test/Ganeti/Block/Drbd/Parser.hs \
        htest/Test/Ganeti/Block/Drbd/Types.hs \
        htest/Test/Ganeti/Common.hs \
+       htest/Test/Ganeti/Confd/Types.hs \
        htest/Test/Ganeti/Confd/Utils.hs \
        htest/Test/Ganeti/Daemon.hs \
        htest/Test/Ganeti/Errors.hs \
@@ -691,13 +693,21 @@ htest/offline-tests.sh: htest/hpc-htools htest/hpc-mon-collector
 # run before)
 .PHONY: hs-prof hs-prof-quick
 hs-prof:
+       @if [ -z "$(TARGET)" ]; then \
+         echo "You need to define TARGET when running this rule" 1>&2; \
+         exit 1; \
+       fi
        $(MAKE) $(AM_MAKEFLAGS) clean
-       $(MAKE) $(AM_MAKEFLAGS) $(HS_ALL_PROGS) HEXTRA="-osuf o"
+       $(MAKE) $(AM_MAKEFLAGS) $(TARGET) HEXTRA="-osuf o"
        rm -f $(HS_ALL_PROGS)
        $(MAKE) $(AM_MAKEFLAGS) hs-prof-quick
 
 hs-prof-quick:
-       $(MAKE) $(AM_MAKEFLAGS) $(HS_ALL_PROGS) HEXTRA="-osuf prof_o -prof -auto-all"
+       @if [ -z "$(TARGET)" ]; then \
+         echo "You need to define TARGET when running this rule" 1>&2; \
+         exit 1; \
+       fi
+       $(MAKE) $(AM_MAKEFLAGS) $(TARGET) HEXTRA="-osuf prof_o -prof -auto-all"
 
 dist_sbin_SCRIPTS = \
        tools/ganeti-listrunner
@@ -1236,6 +1246,7 @@ htools/Ganeti/Version.hs: htools/Ganeti/Version.hs.in \
 
 htools/Ganeti/Constants.hs: htools/Ganeti/Constants.hs.in \
        lib/constants.py lib/_autoconf.py lib/luxi.py lib/errors.py \
+       lib/jstore.py \
        $(CONVERT_CONSTANTS) $(built_base_sources) \
        | lib/_vcsversion.py
        set -e; \
@@ -1320,6 +1331,7 @@ lib/_autoconf.py: Makefile | stamp-directories
          echo "XEN_CMD = '$(XEN_CMD)'"; \
          echo "ENABLE_SPLIT_QUERY = $(ENABLE_SPLIT_QUERY)"; \
          echo "ENABLE_RESTRICTED_COMMANDS = $(ENABLE_RESTRICTED_COMMANDS)"; \
+         echo "ENABLE_MONITORING = $(ENABLE_MONITORING)"; \
        } > $@
 
 lib/_vcsversion.py: Makefile vcs-version | stamp-directories
@@ -1491,23 +1503,28 @@ check-local: check-dirs $(GENERATED_FILES)
        $(CHECK_NEWS) < $(top_srcdir)/NEWS
        PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CHECK_IMPORTS) . $(standalone_python_modules)
        @expver=$(VERSION_MAJOR).$(VERSION_MINOR); \
+       error= ; \
        if test "`head -n 1 $(top_srcdir)/README`" != "Ganeti $$expver"; then \
-         echo "Incorrect version in README, expected $$expver"; \
-         exit 1; \
+         echo "Incorrect version in README, expected $$expver" >&2; \
+         error=1; \
        fi; \
        for file in doc/iallocator.rst doc/hooks.rst doc/virtual-cluster.rst \
            doc/security.rst; do \
          if test "`sed -ne '4 p' $(top_srcdir)/$$file`" != \
            "Documents Ganeti version $$expver"; then \
-           echo "Incorrect version in $$file, expected $$expver"; \
-           exit 1; \
+           echo "Incorrect version in $$file, expected $$expver" >&2; \
+           error=1; \
          fi; \
        done; \
        if ! test -f $(top_srcdir)/doc/design-$$expver.rst; then \
-         echo "File $(top_srcdir)/doc/design-$$expver.rst not found"; \
-         exit 1; \
+         echo "File $(top_srcdir)/doc/design-$$expver.rst not found" >&2; \
+         error=1; \
+       fi; \
+       if test "`sed -ne '5 p' $(top_srcdir)/doc/design-draft.rst`" != \
+         ".. Last updated for Ganeti $$expver"; then \
+         echo "doc/design-draft.rst was not updated for version $$expver" >&2; \
+         error=1; \
        fi; \
-       error= ; \
        for file in configure.ac $(HS_LIBTEST_SRCS) $(HS_PROG_SRCS); do \
          if test $$(wc --max-line-length < $(top_srcdir)/$$file) -gt 80; then \
            echo "Longest line in $$file is longer than 80 characters" >&2; \
@@ -1518,7 +1535,7 @@ check-local: check-dirs $(GENERATED_FILES)
 
 .PHONY: hs-check
 hs-check: htest/test htest/hpc-htools htest/hpc-mon-collector $(HS_BUILT_TEST_HELPERS)
-       @rm -f test.tix
+       @rm -f *.tix
        ./htest/test
        HBINARY="./htest/hpc-htools" ./htest/offline-test.sh