1 include $(top_srcdir)/config/automake/vars.am
2 include $(top_srcdir)/config/automake/scripts.am
12 Amanda_IPC_LineProtocol \
18 all_tests += $(common_tests)
25 all_tests += $(client_tests)
29 Amanda_Changer_compat \
31 Amanda_Changer_multi \
34 Amanda_Changer_robot \
35 Amanda_Changer_single \
44 Amanda_Recovery_Clerk \
45 Amanda_Recovery_Planner \
46 Amanda_Recovery_Scan \
50 Amanda_Taper_Scan_traditional \
59 all_tests += $(server_tests)
74 all_tests += $(full_tests)
80 all_tests += $(restore_tests)
82 restore_tests_no_check_userid = \
84 all_tests += $(restore_tests_no_check_userid)
89 all_tests += $(ndmp_tests)
93 all_tests += $(mock_tests)
101 # data for test scripts
104 EXTRA_DIST += $(test_data)
108 # tests requiring neither client nor server
109 tests += $(common_tests)
110 tests += $(mock_tests)
112 # tests requiring server
114 tests += $(server_tests)
117 # tests requiring client
119 tests += $(client_tests)
122 # tests requiring a client and a server AND restore facilities (any tests that run amdump)
125 # tests requiring a client and a server (any tests that run amdump)
126 tests += $(full_tests)
128 # tests requiring a client, a server, *and* restore code
130 tests += $(restore_tests)
132 # and tests requiring all that *and* requiring CHECK_USERID is not set
134 tests += $(restore_tests_no_check_userid)
140 # tests that need a server with NDMP support
143 tests += $(ndmp_tests)
147 # Add any common files (that should not be run as tests, and that do not
148 # require configure-variable substitution) here:
151 Installcheck/Config.pm \
152 Installcheck/ClientService.pm \
153 Installcheck/Mock.pm \
154 Installcheck/Run.pm \
155 Installcheck/Dumpcache.pm \
156 Installcheck/Application.pm \
157 Installcheck/Changer.pm
158 EXTRA_DIST += $(test_utils)
160 # and finally some development utilities
164 CHECK_PERL_FLAGS=-I$(top_srcdir)/installcheck
166 SCRIPTS_PERL = $(tests) $(mocks) $(noinst_SCRIPTS)
167 SCRIPTS_EXTRA_DIST = $(all_tests)
169 .PHONY: clobber_my_config_is_ok
170 clobber_my_config_is_ok:
171 @if test "$(CONFIG_CLOBBER_MY_CONFIG)" != "OK" -a \
172 "$(CLOBBER_MY_CONFIG)" != "OK"; then \
174 echo "'make installcheck' is a dangerous tool. It will overwrite your"; \
175 echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \
176 echo "bug) may do other unexpected things. You are strongly encouraged"; \
177 echo " - not to run installchecks on a production install"; \
178 echo " - not to run installchecks as root"; \
179 echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \
180 echo "test environment in which potential damage is limited by your filesystem's"; \
181 echo "permissions. To actually run the installchecks, invoke make as follows:"; \
182 echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
186 installcheck-local: clobber_my_config_is_ok $(SCRIPTS_PERL)
187 rm -rf "$(AMANDA_TMPDIR)/installchecks"
188 $(mkdir_p) "$(AMANDA_TMPDIR)/installchecks"
189 @if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
190 cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \
192 $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(sort @ARGV);' $(tests)
193 rm -rf "$(CONFIG_DIR)/TESTCONF"
194 @if test -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
195 mv -f "$(CONFIG_DIR)/amanda-client.conf.install-backup" "$(CONFIG_DIR)/amanda-client.conf"; \
197 rm -rf "$(AMANDA_TMPDIR)/installchecks"