htest/Test \
htest/Test/Ganeti \
htest/Test/Ganeti/Confd \
+ htest/Test/Ganeti/HTools \
htest/Test/Ganeti/Query
DIRS = \
test/data/ovfdata/other \
htest/data \
htest/data/rapi \
+ htest/shelltests \
tools
BUILDTIME_DIR_AUTOCREATE = \
$(APIDOC_HS_DIR)/Ganeti/Confd \
$(APIDOC_HS_DIR)/Ganeti/HTools \
$(APIDOC_HS_DIR)/Ganeti/HTools/Program \
+ $(APIDOC_HS_DIR)/Ganeti/Query \
$(COVERAGE_DIR) \
$(COVERAGE_PY_DIR) \
$(COVERAGE_HS_DIR) \
lib/mcpu.py \
lib/netutils.py \
lib/objects.py \
+ lib/objectutils.py \
lib/opcodes.py \
lib/ovf.py \
+ lib/pathutils.py \
lib/qlang.py \
lib/query.py \
lib/rpc.py \
masterd_PYTHON = \
lib/masterd/__init__.py \
+ lib/masterd/iallocator.py \
lib/masterd/instance.py
impexpd_PYTHON = \
--exclude Ganeti.Constants \
--exclude Ganeti.THH \
--exclude Ganeti.HTools.QC \
- --exclude Ganeti.HTools.Version \
- --exclude Test.Ganeti.TestHelper \
+ --exclude Ganeti.Version \
--exclude Test.Ganeti.TestCommon \
- $(patsubst htools.%,--exclude Test.%,$(subst /,.,$(patsubst %.hs,%, $(filter-out htest/%,$(HS_LIB_SRCS)))))
+ --exclude Test.Ganeti.TestHTools \
+ --exclude Test.Ganeti.TestHelper \
+ --exclude Test.Ganeti.TestImports \
+ $(patsubst htools.%,--exclude Test.%,$(subst /,.,$(patsubst %.hs,%, $(HS_LIB_SRCS))))
HS_LIB_SRCS = \
htools/Ganeti/HTools/CLI.hs \
htools/Ganeti/HTools/Cluster.hs \
- htools/Ganeti/HTools/Compat.hs \
htools/Ganeti/HTools/Container.hs \
htools/Ganeti/HTools/ExtLoader.hs \
htools/Ganeti/HTools/Group.hs \
htools/Ganeti/HTools/IAlloc.hs \
htools/Ganeti/HTools/Instance.hs \
- htools/Ganeti/HTools/JSON.hs \
htools/Ganeti/HTools/Loader.hs \
htools/Ganeti/HTools/Luxi.hs \
htools/Ganeti/HTools/Node.hs \
htools/Ganeti/HTools/PeerMap.hs \
- htools/Ganeti/HTools/QC.hs \
htools/Ganeti/HTools/Rapi.hs \
htools/Ganeti/HTools/Simu.hs \
htools/Ganeti/HTools/Text.hs \
htools/Ganeti/HTools/Program/Hscan.hs \
htools/Ganeti/HTools/Program/Hspace.hs \
htools/Ganeti/BasicTypes.hs \
+ htools/Ganeti/Common.hs \
+ htools/Ganeti/Compat.hs \
htools/Ganeti/Confd.hs \
htools/Ganeti/Confd/Server.hs \
htools/Ganeti/Confd/Utils.hs \
htools/Ganeti/Daemon.hs \
htools/Ganeti/Hash.hs \
htools/Ganeti/Jobs.hs \
+ htools/Ganeti/JSON.hs \
htools/Ganeti/Logging.hs \
htools/Ganeti/Luxi.hs \
htools/Ganeti/Objects.hs \
htools/Ganeti/Rpc.hs \
htools/Ganeti/Runtime.hs \
htools/Ganeti/Ssconf.hs \
- htools/Ganeti/THH.hs \
- htest/Test/Ganeti/TestHelper.hs \
- htest/Test/Ganeti/TestCommon.hs \
+ htools/Ganeti/THH.hs
+
+HS_TEST_SRCS = \
+ htest/Test/Ganeti/BasicTypes.hs \
+ htest/Test/Ganeti/Common.hs \
+ htest/Test/Ganeti/Daemon.hs \
htest/Test/Ganeti/Confd/Utils.hs \
+ htest/Test/Ganeti/HTools/CLI.hs \
+ htest/Test/Ganeti/HTools/Cluster.hs \
+ htest/Test/Ganeti/HTools/Container.hs \
+ htest/Test/Ganeti/HTools/Instance.hs \
+ htest/Test/Ganeti/HTools/Loader.hs \
+ htest/Test/Ganeti/HTools/Node.hs \
+ htest/Test/Ganeti/HTools/PeerMap.hs \
+ htest/Test/Ganeti/HTools/Simu.hs \
+ htest/Test/Ganeti/HTools/Text.hs \
+ htest/Test/Ganeti/HTools/Types.hs \
+ htest/Test/Ganeti/HTools/Utils.hs \
+ htest/Test/Ganeti/JSON.hs \
+ htest/Test/Ganeti/Jobs.hs \
htest/Test/Ganeti/Luxi.hs \
htest/Test/Ganeti/Objects.hs \
htest/Test/Ganeti/OpCodes.hs \
+ htest/Test/Ganeti/Query/Filter.hs \
htest/Test/Ganeti/Query/Language.hs \
+ htest/Test/Ganeti/Query/Query.hs \
htest/Test/Ganeti/Rpc.hs \
- htest/Test/Ganeti/Ssconf.hs
+ htest/Test/Ganeti/Ssconf.hs \
+ htest/Test/Ganeti/TestCommon.hs \
+ htest/Test/Ganeti/TestHTools.hs \
+ htest/Test/Ganeti/TestHelper.hs
+HS_LIBTEST_SRCS = $(HS_LIB_SRCS) $(HS_TEST_SRCS)
-HS_BUILT_SRCS = htools/Ganeti/HTools/Version.hs htools/Ganeti/Constants.hs
+HS_BUILT_SRCS = \
+ htest/Test/Ganeti/TestImports.hs \
+ htools/Ganeti/Constants.hs \
+ htools/Ganeti/Version.hs
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
$(RUN_IN_TEMPDIR): | stamp-directories
endif
endif
-$(HS_ALL_PROGS): %: %.hs $(HS_LIB_SRCS) $(HS_BUILT_SRCS) Makefile
+$(HS_ALL_PROGS): %: %.hs $(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS) Makefile
@if [ -z "$(HTOOLS)" ]; then \
echo "Error: htools compilation disabled at configure time" 1>&2 ;\
exit 1; \
$(maninput) \
qa/qa-sample.json \
$(qa_scripts) \
- $(HS_LIB_SRCS) $(HS_BUILT_SRCS_IN) \
+ $(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS_IN) \
$(HS_PROG_SRCS) \
htools/lint-hints.hs \
htest/cli-tests-defs.sh \
test/ganeti.mcpu_unittest.py \
test/ganeti.netutils_unittest.py \
test/ganeti.objects_unittest.py \
+ test/ganeti.objectutils_unittest.py \
test/ganeti.opcodes_unittest.py \
test/ganeti.ovf_unittest.py \
test/ganeti.qlang_unittest.py \
htest/offline-test.sh \
htest/cli-tests-defs.sh \
$(all_python_code) \
- $(HS_LIB_SRCS) $(HS_PROG_SRCS)
+ $(HS_LIBTEST_SRCS) $(HS_PROG_SRCS)
check_python_code = \
$(BUILD_BASH_COMPLETION) \
$(MAKE) $(AM_MAKEFLAGS) vcs-version; \
fi
-htools/Ganeti/HTools/Version.hs: htools/Ganeti/HTools/Version.hs.in \
+htools/Ganeti/Version.hs: htools/Ganeti/Version.hs.in \
vcs-version $(built_base_sources)
set -e; \
VCSVER=`cat $(abs_top_srcdir)/vcs-version`; \
set -e; \
{ cat $< ; PYTHONPATH=. $(CONVERT_CONSTANTS); } > $@
+htest/Test/Ganeti/TestImports.hs: htest/Test/Ganeti/TestImports.hs.in \
+ $(built_base_sources)
+ set -e; \
+ { cat $< ; \
+ echo ; \
+ for name in $(filter-out Ganeti.THH,$(subst /,.,$(patsubst %.hs,%,$(patsubst htools/%,%,$(HS_LIB_SRCS))))) ; do \
+ echo "import $$name ()" ; \
+ done ; \
+ } > $@
+
lib/_autoconf.py: Makefile | stamp-directories
set -e; \
{ echo '# This file is automatically generated, do not edit!'; \
--ignore "Use &&&" \
--ignore "Use void" \
--hint htools/lint-hints \
- $(filter-out htools/Ganeti/THH.hs,$(HS_LIB_SRCS))
+ $(filter-out htools/Ganeti/THH.hs,$(HS_LIBTEST_SRCS))
# a dist hook rule for updating the vcs-version file; this is
# hardcoded due to where it needs to build the file...
if [ "$(HTOOLS_PARALLEL3)" ]; \
then OPTGHC="$$OPTGHC --optghc=$(HTOOLS_PARALLEL3)"; \
fi; \
- RELSRCS="$(HS_LIB_SRCS:htools/%=%) $(HS_BUILT_SRCS:htools/%=%)"; \
+ RELSRCS="$(HS_LIB_SRCS:htools/%=%) $(patsubst htools/%,%,$(filter htools/%,$(HS_BUILT_SRCS)))"; \
for file in $$RELSRCS; do \
hfile=`echo $$file|sed 's/\\.hs$$//'`.html; \
$(HSCOLOUR) -css -anchor $$file > ../$(APIDOC_HS_DIR)/$$hfile ; \
.PHONY: TAGS
TAGS: $(GENERATED_FILES)
rm -f TAGS
- $(GHC) -e ":etags" -v0 $(HFLAGS) $(HS_LIB_SRCS)
+ $(GHC) -e ":etags" -v0 $(HFLAGS) $(HS_LIBTEST_SRCS)
find . -path './lib/*.py' -o -path './scripts/gnt-*' -o \
-path './daemons/ganeti-*' -o -path './tools/*' -o \
-path './qa/*.py' | \