1 # Note that this architecture assumes a full install -- not just server
2 # or just client. Neither is sufficiently test-able on its own.
4 include $(top_srcdir)/config/automake/vars.am
5 include $(top_srcdir)/config/automake/scripts.am
20 Amanda_Changer_compat \
22 Amanda_Changer_single \
45 # tests requiring neither client nor server
46 tests = $(common_tests)
48 # tests requiring server
50 tests += $(server_tests)
53 # tests requiring a client and a server (any tests that run amdump)
56 tests += $(full_tests)
60 # tests requiring a client and a server AND restore facilities (any tests that run amdump)
64 tests += $(restore_tests)
69 # Add any common files (that should not be run as tests, and that do not
70 # require configure-variable substitution) here:
71 test_utils = Installcheck/Config.pm Installcheck/Run.pm
72 EXTRA_DIST += $(test_utils)
74 CHECK_PERL_FLAGS=-I$(top_srcdir)/installcheck
76 SCRIPTS_PERL = $(tests)
78 # we don't need to syntax check the test scripts..
81 .PHONY: clobber_my_config_is_ok
82 clobber_my_config_is_ok:
83 @if test "$(CONFIG_CLOBBER_MY_CONFIG)" != "OK" -a \
84 "$(CLOBBER_MY_CONFIG)" != "OK"; then \
86 echo "'make installcheck' is a dangerous tool. It will overwrite your"; \
87 echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \
88 echo "bug) may do other unexpected things. You are strongly encouraged"; \
89 echo " - not to run installchecks on a production install"; \
90 echo " - not to run installchecks as root"; \
91 echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \
92 echo "test environment in which potential damage is limited by your filesystem's"; \
93 echo "permissions. To actually run the installchecks, invoke make as follows:"; \
94 echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
98 installcheck-local: clobber_my_config_is_ok $(SCRIPTS_PERL)
99 @$(mkdir_p) $(AMANDA_TMPDIR)
100 @if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
101 cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \
103 $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(@ARGV);' $(tests)
104 rm -rf "$(CONFIG_DIR)/TESTCONF"
105 @if test -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
106 mv -f "$(CONFIG_DIR)/amanda-client.conf.install-backup" "$(CONFIG_DIR)/amanda-client.conf"; \
108 rm -rf "$(AMANDA_TMPDIR)/TESTCONF/amandates"
109 rm -rf "$(AMANDA_TMPDIR)/TESTCONF/gnutar_listdir"