Revision 83846468 Makefile.am

b/Makefile.am
65 65
	src/Ganeti/HTools/Backend \
66 66
	src/Ganeti/HTools/Program \
67 67
	src/Ganeti/Query \
68
	htest \
69
	htest/Test \
70
	htest/Test/Ganeti \
71
	htest/Test/Ganeti/Block \
72
	htest/Test/Ganeti/Block/Drbd \
73
	htest/Test/Ganeti/Confd \
74
	htest/Test/Ganeti/HTools \
75
	htest/Test/Ganeti/HTools/Backend \
76
	htest/Test/Ganeti/Query
68
	test/hs \
69
	test/hs/Test \
70
	test/hs/Test/Ganeti \
71
	test/hs/Test/Ganeti/Block \
72
	test/hs/Test/Ganeti/Block/Drbd \
73
	test/hs/Test/Ganeti/Confd \
74
	test/hs/Test/Ganeti/HTools \
75
	test/hs/Test/Ganeti/HTools/Backend \
76
	test/hs/Test/Ganeti/Query
77 77

  
78 78
DIRS = \
79 79
	$(HS_DIRS) \
......
84 84
	doc/examples \
85 85
	doc/examples/gnt-debug \
86 86
	doc/examples/hooks \
87
	htest/data \
88
	htest/data/rapi \
89
	htest/shelltests \
87
	test/data/htools \
88
	test/data/htools/rapi \
89
	test/hs/shelltests \
90 90
	lib \
91 91
	lib/build \
92 92
	lib/client \
......
184 184
	$(HS_ALL_PROGS) $(HS_BUILT_SRCS) \
185 185
	$(HS_BUILT_TEST_HELPERS) \
186 186
	src/ganeti-confd \
187
	.hpc/*.mix src/*.tix htest/*.tix \
187
	.hpc/*.mix src/*.tix test/hs/*.tix \
188 188
	doc/hs-lint.html
189 189

  
190 190
GENERATED_FILES = \
......
415 415

  
416 416
HS_ALL_PROGS = \
417 417
	$(HS_PROGS) \
418
	htest/hpc-htools \
419
	htest/hpc-mon-collector \
420
	htest/test \
418
	test/hs/hpc-htools \
419
	test/hs/hpc-mon-collector \
420
	test/hs/test \
421 421
	src/hconfd \
422 422
	src/rpc-test
423 423

  
424 424
HS_PROG_SRCS = $(patsubst %,%.hs,$(HS_ALL_PROGS))
425
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=htest/%) htest/hail
425
HS_BUILT_TEST_HELPERS = $(HS_BIN_ROLES:%=test/hs/%) test/hs/hail
426 426

  
427 427
HFLAGS = \
428 428
	-O -Wall -Werror -isrc \
......
432 432

  
433 433
# extra flags that can be overriden on the command line (e.g. -Wwarn, etc.)
434 434
HEXTRA =
435
# internal extra flags (used for htest/test mainly)
435
# internal extra flags (used for test/hs/test mainly)
436 436
HEXTRA_INT =
437 437
# exclude options for coverage reports
438 438
HPCEXCL = --exclude Main \
......
515 515
	src/Ganeti/Utils.hs
516 516

  
517 517
HS_TEST_SRCS = \
518
	htest/Test/Ganeti/Attoparsec.hs \
519
	htest/Test/Ganeti/BasicTypes.hs \
520
	htest/Test/Ganeti/Block/Drbd/Parser.hs \
521
	htest/Test/Ganeti/Block/Drbd/Types.hs \
522
	htest/Test/Ganeti/Common.hs \
523
	htest/Test/Ganeti/Confd/Types.hs \
524
	htest/Test/Ganeti/Confd/Utils.hs \
525
	htest/Test/Ganeti/Daemon.hs \
526
	htest/Test/Ganeti/Errors.hs \
527
	htest/Test/Ganeti/HTools/Backend/Simu.hs \
528
	htest/Test/Ganeti/HTools/Backend/Text.hs \
529
	htest/Test/Ganeti/HTools/CLI.hs \
530
	htest/Test/Ganeti/HTools/Cluster.hs \
531
	htest/Test/Ganeti/HTools/Container.hs \
532
	htest/Test/Ganeti/HTools/Graph.hs \
533
	htest/Test/Ganeti/HTools/Instance.hs \
534
	htest/Test/Ganeti/HTools/Loader.hs \
535
	htest/Test/Ganeti/HTools/Node.hs \
536
	htest/Test/Ganeti/HTools/PeerMap.hs \
537
	htest/Test/Ganeti/HTools/Types.hs \
538
	htest/Test/Ganeti/JSON.hs \
539
	htest/Test/Ganeti/Jobs.hs \
540
	htest/Test/Ganeti/JQueue.hs \
541
	htest/Test/Ganeti/Luxi.hs \
542
	htest/Test/Ganeti/Network.hs \
543
	htest/Test/Ganeti/Objects.hs \
544
	htest/Test/Ganeti/OpCodes.hs \
545
	htest/Test/Ganeti/Query/Filter.hs \
546
	htest/Test/Ganeti/Query/Language.hs \
547
	htest/Test/Ganeti/Query/Query.hs \
548
	htest/Test/Ganeti/Rpc.hs \
549
	htest/Test/Ganeti/Ssconf.hs \
550
	htest/Test/Ganeti/THH.hs \
551
	htest/Test/Ganeti/TestCommon.hs \
552
	htest/Test/Ganeti/TestHTools.hs \
553
	htest/Test/Ganeti/TestHelper.hs \
554
	htest/Test/Ganeti/Types.hs \
555
	htest/Test/Ganeti/Utils.hs
518
	test/hs/Test/Ganeti/Attoparsec.hs \
519
	test/hs/Test/Ganeti/BasicTypes.hs \
520
	test/hs/Test/Ganeti/Block/Drbd/Parser.hs \
521
	test/hs/Test/Ganeti/Block/Drbd/Types.hs \
522
	test/hs/Test/Ganeti/Common.hs \
523
	test/hs/Test/Ganeti/Confd/Types.hs \
524
	test/hs/Test/Ganeti/Confd/Utils.hs \
525
	test/hs/Test/Ganeti/Daemon.hs \
526
	test/hs/Test/Ganeti/Errors.hs \
527
	test/hs/Test/Ganeti/HTools/Backend/Simu.hs \
528
	test/hs/Test/Ganeti/HTools/Backend/Text.hs \
529
	test/hs/Test/Ganeti/HTools/CLI.hs \
530
	test/hs/Test/Ganeti/HTools/Cluster.hs \
531
	test/hs/Test/Ganeti/HTools/Container.hs \
532
	test/hs/Test/Ganeti/HTools/Graph.hs \
533
	test/hs/Test/Ganeti/HTools/Instance.hs \
534
	test/hs/Test/Ganeti/HTools/Loader.hs \
535
	test/hs/Test/Ganeti/HTools/Node.hs \
536
	test/hs/Test/Ganeti/HTools/PeerMap.hs \
537
	test/hs/Test/Ganeti/HTools/Types.hs \
538
	test/hs/Test/Ganeti/JSON.hs \
539
	test/hs/Test/Ganeti/Jobs.hs \
540
	test/hs/Test/Ganeti/JQueue.hs \
541
	test/hs/Test/Ganeti/Luxi.hs \
542
	test/hs/Test/Ganeti/Network.hs \
543
	test/hs/Test/Ganeti/Objects.hs \
544
	test/hs/Test/Ganeti/OpCodes.hs \
545
	test/hs/Test/Ganeti/Query/Filter.hs \
546
	test/hs/Test/Ganeti/Query/Language.hs \
547
	test/hs/Test/Ganeti/Query/Query.hs \
548
	test/hs/Test/Ganeti/Rpc.hs \
549
	test/hs/Test/Ganeti/Ssconf.hs \
550
	test/hs/Test/Ganeti/THH.hs \
551
	test/hs/Test/Ganeti/TestCommon.hs \
552
	test/hs/Test/Ganeti/TestHTools.hs \
553
	test/hs/Test/Ganeti/TestHelper.hs \
554
	test/hs/Test/Ganeti/Types.hs \
555
	test/hs/Test/Ganeti/Utils.hs
556 556

  
557 557
HS_LIBTEST_SRCS = $(HS_LIB_SRCS) $(HS_TEST_SRCS)
558 558

  
559 559
HS_BUILT_SRCS = \
560
	htest/Test/Ganeti/TestImports.hs \
560
	test/hs/Test/Ganeti/TestImports.hs \
561 561
	src/Ganeti/Constants.hs \
562 562
	src/Ganeti/Version.hs
563 563
HS_BUILT_SRCS_IN = $(patsubst %,%.in,$(HS_BUILT_SRCS))
......
684 684
	  $(HEXTRA) $(HEXTRA_INT) $@
685 685
	@touch "$@"
686 686

  
687
# for the htest/test binary, we need to enable profiling/coverage
688
htest/test: HEXTRA_INT=-fhpc -ihtest
687
# for the test/hs/test binary, we need to enable profiling/coverage
688
test/hs/test: HEXTRA_INT=-fhpc -itest/hs
689 689

  
690 690
# we compile the hpc-htools binary with the program coverage
691
htest/hpc-htools: HEXTRA_INT=-fhpc
691
test/hs/hpc-htools: HEXTRA_INT=-fhpc
692 692

  
693 693
# we compile the hpc-mon-collector binary with the program coverage
694
htest/hpc-mon-collector: HEXTRA_INT=-fhpc
694
test/hs/hpc-mon-collector: HEXTRA_INT=-fhpc
695 695

  
696 696
# test dependency
697
htest/offline-tests.sh: htest/hpc-htools htest/hpc-mon-collector
697
test/hs/offline-tests.sh: test/hs/hpc-htools test/hs/hpc-mon-collector
698 698

  
699 699
# rules for building profiling-enabled versions of the haskell
700 700
# programs: hs-prof does the full two-step build, whereas
......
828 828
	$(HS_LIBTEST_SRCS) $(HS_BUILT_SRCS_IN) \
829 829
	$(HS_PROG_SRCS) \
830 830
	src/lint-hints.hs \
831
	htest/cli-tests-defs.sh \
832
	htest/offline-test.sh \
831
	test/hs/cli-tests-defs.sh \
832
	test/hs/offline-test.sh \
833 833
	.ghci
834 834

  
835 835
man_MANS = \
......
872 872
	man/footer.man man/footer.html $(mangen)
873 873

  
874 874
TEST_FILES = \
875
	htest/data/clean-nonzero-score.data \
876
	htest/data/common-suffix.data \
877
	htest/data/empty-cluster.data \
878
	htest/data/hail-alloc-drbd.json \
879
	htest/data/hail-change-group.json \
880
	htest/data/hail-invalid-reloc.json \
881
	htest/data/hail-node-evac.json \
882
	htest/data/hail-reloc-drbd.json \
883
	htest/data/hbal-excl-tags.data \
884
	htest/data/hbal-split-insts.data \
885
	htest/data/invalid-node.data \
886
	htest/data/missing-resources.data \
887
	htest/data/n1-failure.data \
888
	htest/data/rapi/groups.json \
889
	htest/data/rapi/info.json \
890
	htest/data/rapi/instances.json \
891
	htest/data/rapi/nodes.json \
892
	htest/shelltests/htools-balancing.test \
893
	htest/shelltests/htools-basic.test \
894
	htest/shelltests/htools-dynutil.test \
895
	htest/shelltests/htools-excl.test \
896
	htest/shelltests/htools-hail.test \
897
	htest/shelltests/htools-hspace.test \
898
	htest/shelltests/htools-invalid.test \
899
	htest/shelltests/htools-multi-group.test \
900
	htest/shelltests/htools-no-backend.test \
901
	htest/shelltests/htools-rapi.test \
902
	htest/shelltests/htools-single-group.test \
903
	htest/shelltests/htools-text-backend.test \
904
	htest/shelltests/htools-mon-collector.test \
875
	test/data/htools/clean-nonzero-score.data \
876
	test/data/htools/common-suffix.data \
877
	test/data/htools/empty-cluster.data \
878
	test/data/htools/hail-alloc-drbd.json \
879
	test/data/htools/hail-change-group.json \
880
	test/data/htools/hail-invalid-reloc.json \
881
	test/data/htools/hail-node-evac.json \
882
	test/data/htools/hail-reloc-drbd.json \
883
	test/data/htools/hbal-excl-tags.data \
884
	test/data/htools/hbal-split-insts.data \
885
	test/data/htools/invalid-node.data \
886
	test/data/htools/missing-resources.data \
887
	test/data/htools/n1-failure.data \
888
	test/data/htools/rapi/groups.json \
889
	test/data/htools/rapi/info.json \
890
	test/data/htools/rapi/instances.json \
891
	test/data/htools/rapi/nodes.json \
892
	test/hs/shelltests/htools-balancing.test \
893
	test/hs/shelltests/htools-basic.test \
894
	test/hs/shelltests/htools-dynutil.test \
895
	test/hs/shelltests/htools-excl.test \
896
	test/hs/shelltests/htools-hail.test \
897
	test/hs/shelltests/htools-hspace.test \
898
	test/hs/shelltests/htools-invalid.test \
899
	test/hs/shelltests/htools-multi-group.test \
900
	test/hs/shelltests/htools-no-backend.test \
901
	test/hs/shelltests/htools-rapi.test \
902
	test/hs/shelltests/htools-single-group.test \
903
	test/hs/shelltests/htools-text-backend.test \
904
	test/hs/shelltests/htools-mon-collector.test \
905 905
	test/data/bdev-drbd-8.0.txt \
906 906
	test/data/bdev-drbd-8.3.txt \
907 907
	test/data/bdev-drbd-disk.txt \
......
1040 1040
	test/py/qa.qa_config_unittest.py \
1041 1041
	test/py/tempfile_fork_unittest.py
1042 1042

  
1043
haskell_tests = htest/test
1043
haskell_tests = test/hs/test
1044 1044

  
1045 1045
dist_TESTS = \
1046 1046
	test/py/check-cert-expired_unittest.bash \
......
1056 1056

  
1057 1057
if WANT_HSTESTS
1058 1058
nodist_TESTS += $(haskell_tests)
1059
dist_TESTS += htest/offline-test.sh
1059
dist_TESTS += test/hs/offline-test.sh
1060 1060
check_SCRIPTS += \
1061
	htest/hpc-htools \
1062
	htest/hpc-mon-collector \
1061
	test/hs/hpc-htools \
1062
	test/hs/hpc-mon-collector \
1063 1063
	$(HS_BUILT_TEST_HELPERS)
1064 1064
endif
1065 1065

  
......
1106 1106
	test/py/import-export_unittest.bash \
1107 1107
	test/py/cli-test.bash \
1108 1108
	test/py/bash_completion.bash \
1109
	htest/offline-test.sh \
1110
	htest/cli-tests-defs.sh \
1109
	test/hs/offline-test.sh \
1110
	test/hs/cli-tests-defs.sh \
1111 1111
	$(all_python_code) \
1112 1112
	$(HS_LIBTEST_SRCS) $(HS_PROG_SRCS)
1113 1113

  
......
1269 1269
	  PYTHONPATH=. $(RUN_IN_TEMPDIR) $(CURDIR)/$(CONVERT_CONSTANTS); \
1270 1270
	} > $@
1271 1271

  
1272
htest/Test/Ganeti/TestImports.hs: htest/Test/Ganeti/TestImports.hs.in \
1272
test/hs/Test/Ganeti/TestImports.hs: test/hs/Test/Ganeti/TestImports.hs.in \
1273 1273
	$(built_base_sources)
1274 1274
	set -e; \
1275 1275
	{ cat $< ; \
......
1433 1433
tools/node-daemon-setup: MODULE = ganeti.tools.node_daemon_setup
1434 1434
tools/prepare-node-join: MODULE = ganeti.tools.prepare_node_join
1435 1435
tools/node-cleanup: MODULE = ganeti.tools.node_cleanup
1436
$(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst htest/%,%,$@)
1436
$(HS_BUILT_TEST_HELPERS): TESTROLE = $(patsubst test/hs/%,%,$@)
1437 1437

  
1438 1438
$(PYTHON_BOOTSTRAP): Makefile | stamp-directories
1439 1439
	test -n "$(MODULE)" || { echo Missing module; exit 1; }
......
1469 1469
	  echo '# This file is automatically generated, do not edit!'; \
1470 1470
	  echo "# Edit Makefile.am instead."; \
1471 1471
	  echo; \
1472
	  echo "HTOOLS=$(TESTROLE) exec ./htest/hpc-htools \"\$$@\""; \
1472
	  echo "HTOOLS=$(TESTROLE) exec ./test/hs/hpc-htools \"\$$@\""; \
1473 1473
	} > $@
1474 1474
	chmod u+x $@
1475 1475

  
......
1552 1552
	test -z "$$error"
1553 1553

  
1554 1554
.PHONY: hs-check
1555
hs-check: htest/test htest/hpc-htools htest/hpc-mon-collector $(HS_BUILT_TEST_HELPERS) \
1555
hs-check: test/hs/test test/hs/hpc-htools test/hs/hpc-mon-collector $(HS_BUILT_TEST_HELPERS) \
1556 1556
	| $(BUILT_PYTHON_SOURCES)
1557 1557
	@rm -f *.tix
1558
	./htest/test
1559
	HBINARY="./htest/hpc-htools" ./htest/offline-test.sh
1558
	./test/hs/test
1559
	HBINARY="./test/hs/hpc-htools" ./test/hs/offline-test.sh
1560 1560

  
1561 1561
# E111: indentation is not a multiple of four
1562 1562
# E121: continuation line indentation is not a multiple of four
......
1606 1606
	  --repeat $(pep8_python_code)
1607 1607

  
1608 1608
# FIXME: remove ignore "Use void" when GHC 6.x is deprecated
1609
HLINT_EXCLUDES = src/Ganeti/THH.hs htest/hpc-htools.hs
1609
HLINT_EXCLUDES = src/Ganeti/THH.hs test/hs/hpc-htools.hs
1610 1610
.PHONY: hlint
1611 1611
hlint: $(HS_BUILT_SRCS) src/lint-hints.hs
1612 1612
	@test -n "$(HLINT)" || { echo 'hlint' not found during configure; exit 1; }
......
1768 1768
	$(python_tests)
1769 1769

  
1770 1770
.PHONY: hs-coverage
1771
hs-coverage: $(haskell_tests) htest/hpc-htools htest/hpc-mon-collector
1771
hs-coverage: $(haskell_tests) test/hs/hpc-htools test/hs/hpc-mon-collector
1772 1772
	rm -f *.tix
1773 1773
	$(MAKE) $(AM_MAKEFLAGS) hs-check
1774 1774
	@mkdir_p@ $(COVERAGE_HS_DIR)

Also available in: Unified diff