1 include $(top_srcdir)/config/automake/vars.am
2 include $(top_srcdir)/config/automake/scripts.am
8 Amanda_Config_FoldingHash \
13 Amanda_IPC_LineProtocol \
20 all_tests += $(common_tests)
27 all_tests += $(client_tests)
31 Amanda_Changer_compat \
33 Amanda_Changer_multi \
36 Amanda_Changer_robot \
37 Amanda_Changer_single \
46 Amanda_Recovery_Clerk \
47 Amanda_Recovery_Planner \
48 Amanda_Recovery_Scan \
52 Amanda_Taper_Scan_lexical \
53 Amanda_Taper_Scan_oldest \
54 Amanda_Taper_Scan_traditional \
64 all_tests += $(server_tests)
84 all_tests += $(full_tests)
90 all_tests += $(restore_tests)
92 restore_tests_no_check_userid = \
94 all_tests += $(restore_tests_no_check_userid)
99 all_tests += $(ndmp_tests)
103 all_tests += $(mock_tests)
111 # data for test scripts
114 EXTRA_DIST += $(test_data)
118 # tests requiring neither client nor server
119 tests += $(common_tests)
120 tests += $(mock_tests)
122 # tests requiring server
124 tests += $(server_tests)
127 # tests requiring client
129 tests += $(client_tests)
132 # tests requiring a client and a server AND restore facilities (any tests that run amdump)
135 # tests requiring a client and a server (any tests that run amdump)
136 tests += $(full_tests)
138 # tests requiring a client, a server, *and* restore code
140 tests += $(restore_tests)
142 # and tests requiring all that *and* requiring CHECK_USERID is not set
144 tests += $(restore_tests_no_check_userid)
150 # tests that need a server with NDMP support
153 tests += $(ndmp_tests)
157 # Add any common files (that should not be run as tests, and that do not
158 # require configure-variable substitution) here:
161 Installcheck/Catalogs.pm \
162 Installcheck/Config.pm \
163 Installcheck/ClientService.pm \
164 Installcheck/Mock.pm \
165 Installcheck/Run.pm \
166 Installcheck/Dumpcache.pm \
167 Installcheck/Application.pm \
168 Installcheck/Changer.pm
169 EXTRA_DIST += $(test_utils)
171 # the catalogs themselves
173 catalogs/amflush.cat \
175 catalogs/bigestimate.cat \
176 catalogs/chunker-partial.cat \
177 catalogs/doublefailure.cat \
179 catalogs/filesystemstaped.cat \
180 catalogs/flush-noorigsize.cat \
181 catalogs/flush-origsize.cat \
182 catalogs/longstrange.cat \
183 catalogs/multi-taper.cat \
184 catalogs/normal.cat \
185 catalogs/plannerfail.cat \
186 catalogs/quoted.cat \
187 catalogs/resultsmissing.cat \
188 catalogs/retried.cat \
189 catalogs/retried-nofinish.cat \
190 catalogs/retried-strange.cat \
191 catalogs/shortstrange.cat \
192 catalogs/skipped.cat \
193 catalogs/spanned.cat \
194 catalogs/strontium.cat \
196 EXTRA_DIST += $(catalogs)
199 # and finally some development utilities
203 CHECK_PERL_FLAGS=-I$(top_srcdir)/installcheck
205 SCRIPTS_PERL = $(tests) $(mocks) $(noinst_SCRIPTS)
206 SCRIPTS_EXTRA_DIST = $(all_tests)
208 # skip syntax checks on these files, since we're about to run all of them
211 .PHONY: clobber_my_config_is_ok
212 clobber_my_config_is_ok:
213 @if test "$(CONFIG_CLOBBER_MY_CONFIG)" != "OK" -a \
214 "$(CLOBBER_MY_CONFIG)" != "OK"; then \
216 echo "'make installcheck' is a dangerous tool. It will overwrite your"; \
217 echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \
218 echo "bug) may do other unexpected things. You are strongly encouraged"; \
219 echo " - not to run installchecks on a production install"; \
220 echo " - not to run installchecks as root"; \
221 echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \
222 echo "test environment in which potential damage is limited by your filesystem's"; \
223 echo "permissions. To actually run the installchecks, invoke make as follows:"; \
224 echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
228 # newer Test::Harness (v3.18-3.21) implementations get confused by executable
229 # test scripts, so this rule chmod a-x's them first
230 installcheck-local: clobber_my_config_is_ok $(SCRIPTS_PERL)
231 rm -rf "$(AMANDA_TMPDIR)/installchecks"
232 $(mkdir_p) "$(AMANDA_TMPDIR)/installchecks"
233 @if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
234 cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \
236 for f in $(tests); do chmod a-x $$f; done
237 srcdir="$(srcdir)" $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(sort @ARGV);' $(tests)
238 rm -rf "$(CONFIG_DIR)/TESTCONF"
239 @if test -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
240 mv -f "$(CONFIG_DIR)/amanda-client.conf.install-backup" "$(CONFIG_DIR)/amanda-client.conf"; \
242 rm -rf "$(AMANDA_TMPDIR)/installchecks"