HS_ALL_PROGS = \
$(HS_PROGS) \
htest/hpc-htools \
+ htest/hpc-mon-collector \
htest/test \
htools/hconfd \
htools/rpc-test
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 \
htools/Ganeti/HTools/Program/Hspace.hs \
htools/Ganeti/HTools/Types.hs \
htools/Ganeti/Hash.hs \
+ htools/Ganeti/JQueue.hs \
htools/Ganeti/JSON.hs \
htools/Ganeti/Jobs.hs \
htools/Ganeti/Logging.hs \
htools/Ganeti/Query/Common.hs \
htools/Ganeti/Query/Filter.hs \
htools/Ganeti/Query/Group.hs \
+ htools/Ganeti/Query/Job.hs \
htools/Ganeti/Query/Language.hs \
htools/Ganeti/Query/Node.hs \
htools/Ganeti/Query/Query.hs \
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 \
htest/Test/Ganeti/HTools/Types.hs \
htest/Test/Ganeti/JSON.hs \
htest/Test/Ganeti/Jobs.hs \
+ htest/Test/Ganeti/JQueue.hs \
htest/Test/Ganeti/Luxi.hs \
htest/Test/Ganeti/Network.hs \
htest/Test/Ganeti/Objects.hs \
# we compile the hpc-htools binary with the program coverage
htest/hpc-htools: HEXTRA_INT=-fhpc
+# we compile the hpc-mon-collector binary with the program coverage
+htest/hpc-mon-collector: HEXTRA_INT=-fhpc
+
# test dependency
-htest/offline-tests.sh: htest/hpc-htools
+htest/offline-tests.sh: htest/hpc-htools htest/hpc-mon-collector
# rules for building profiling-enabled versions of the haskell
# programs: hs-prof does the full two-step build, whereas
# 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
htest/shelltests/htools-rapi.test \
htest/shelltests/htools-single-group.test \
htest/shelltests/htools-text-backend.test \
+ htest/shelltests/htools-mon-collector.test \
test/data/bdev-drbd-8.0.txt \
test/data/bdev-drbd-8.3.txt \
test/data/bdev-drbd-disk.txt \
if WANT_HTOOLSTESTS
nodist_TESTS += $(haskell_tests)
dist_TESTS += htest/offline-test.sh
-check_SCRIPTS += htest/hpc-htools $(HS_BUILT_TEST_HELPERS)
+check_SCRIPTS += \
+ htest/hpc-htools \
+ htest/hpc-mon-collector \
+ $(HS_BUILT_TEST_HELPERS)
endif
TESTS = $(dist_TESTS) $(nodist_TESTS)
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; \
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
$(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; \
test -z "$$error"
.PHONY: hs-check
-hs-check: htest/test htest/hpc-htools $(HS_BUILT_TEST_HELPERS)
- @rm -f test.tix
+hs-check: htest/test htest/hpc-htools htest/hpc-mon-collector $(HS_BUILT_TEST_HELPERS)
+ @rm -f *.tix
./htest/test
HBINARY="./htest/hpc-htools" ./htest/offline-test.sh
if tty -s; then C="-c"; else C=""; fi; \
$(HLINT) --utf8 --report=doc/hs-lint.html --cross $$C \
--ignore "Use first" \
- --ignore "Use comparing" \
- --ignore "Use on" \
- --ignore "Reduce duplication" \
--ignore "Use &&&" \
--ignore "Use void" \
+ --ignore "Reduce duplication" \
--hint htools/lint-hints \
$(filter-out $(HLINT_EXCLUDES),$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS))
$(python_tests)
.PHONY: hs-coverage
-hs-coverage: $(haskell_tests) htest/hpc-htools
+hs-coverage: $(haskell_tests) htest/hpc-htools htest/hpc-mon-collector
rm -f *.tix
$(MAKE) $(AM_MAKEFLAGS) hs-check
@mkdir_p@ $(COVERAGE_HS_DIR)
- hpc combine --union $(HPCEXCL) \
- test.tix hpc-htools.tix > coverage-htools.tix
+ hpc sum --union $(HPCEXCL) \
+ test.tix hpc-htools.tix hpc-mon-collector.tix > coverage-htools.tix
hpc markup --destdir=$(COVERAGE_HS_DIR) coverage-htools.tix
hpc report coverage-htools.tix
$(LN_S) -f hpc_index.html $(COVERAGE_HS_DIR)/index.html