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_traditional \
62 all_tests += $(server_tests)
81 all_tests += $(full_tests)
87 all_tests += $(restore_tests)
89 restore_tests_no_check_userid = \
91 all_tests += $(restore_tests_no_check_userid)
96 all_tests += $(ndmp_tests)
100 all_tests += $(mock_tests)
108 # data for test scripts
111 EXTRA_DIST += $(test_data)
115 # tests requiring neither client nor server
116 tests += $(common_tests)
117 tests += $(mock_tests)
119 # tests requiring server
121 tests += $(server_tests)
124 # tests requiring client
126 tests += $(client_tests)
129 # tests requiring a client and a server AND restore facilities (any tests that run amdump)
132 # tests requiring a client and a server (any tests that run amdump)
133 tests += $(full_tests)
135 # tests requiring a client, a server, *and* restore code
137 tests += $(restore_tests)
139 # and tests requiring all that *and* requiring CHECK_USERID is not set
141 tests += $(restore_tests_no_check_userid)
147 # tests that need a server with NDMP support
150 tests += $(ndmp_tests)
154 # Add any common files (that should not be run as tests, and that do not
155 # require configure-variable substitution) here:
158 Installcheck/Catalogs.pm \
159 Installcheck/Config.pm \
160 Installcheck/ClientService.pm \
161 Installcheck/Mock.pm \
162 Installcheck/Run.pm \
163 Installcheck/Dumpcache.pm \
164 Installcheck/Application.pm \
165 Installcheck/Changer.pm
166 EXTRA_DIST += $(test_utils)
168 # the catalogs themselves
170 catalogs/amflush.cat \
172 catalogs/bigestimate.cat \
173 catalogs/chunker-partial.cat \
174 catalogs/doublefailure.cat \
176 catalogs/filesystemstaped.cat \
177 catalogs/flush-noorigsize.cat \
178 catalogs/flush-origsize.cat \
179 catalogs/longstrange.cat \
180 catalogs/multi-taper.cat \
181 catalogs/normal.cat \
182 catalogs/plannerfail.cat \
183 catalogs/quoted.cat \
184 catalogs/resultsmissing.cat \
185 catalogs/retried.cat \
186 catalogs/retried-nofinish.cat \
187 catalogs/retried-strange.cat \
188 catalogs/shortstrange.cat \
189 catalogs/skipped.cat \
190 catalogs/spanned.cat \
191 catalogs/strontium.cat \
193 EXTRA_DIST += $(catalogs)
196 # and finally some development utilities
200 CHECK_PERL_FLAGS=-I$(top_srcdir)/installcheck
202 SCRIPTS_PERL = $(tests) $(mocks) $(noinst_SCRIPTS)
203 SCRIPTS_EXTRA_DIST = $(all_tests)
205 # skip syntax checks on these files, since we're about to run all of them
208 .PHONY: clobber_my_config_is_ok
209 clobber_my_config_is_ok:
210 @if test "$(CONFIG_CLOBBER_MY_CONFIG)" != "OK" -a \
211 "$(CLOBBER_MY_CONFIG)" != "OK"; then \
213 echo "'make installcheck' is a dangerous tool. It will overwrite your"; \
214 echo "amanda-client.conf and amandates, and (if it triggers an as-yet undetected"; \
215 echo "bug) may do other unexpected things. You are strongly encouraged"; \
216 echo " - not to run installchecks on a production install"; \
217 echo " - not to run installchecks as root"; \
218 echo "See http://wiki.zmanda.com/index.php/Testing for instructions on setting up a"; \
219 echo "test environment in which potential damage is limited by your filesystem's"; \
220 echo "permissions. To actually run the installchecks, invoke make as follows:"; \
221 echo " $(MAKE) CLOBBER_MY_CONFIG=OK installcheck"; \
225 # newer Test::Harness (v3.18-3.21) implementations get confused by executable
226 # test scripts, so this rule chmod a-x's them first
227 installcheck-local: clobber_my_config_is_ok $(SCRIPTS_PERL)
228 rm -rf "$(AMANDA_TMPDIR)/installchecks"
229 $(mkdir_p) "$(AMANDA_TMPDIR)/installchecks"
230 @if test -f "$(CONFIG_DIR)/amanda-client.conf" -a ! -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
231 cp "$(CONFIG_DIR)/amanda-client.conf" "$(CONFIG_DIR)/amanda-client.conf.install-backup"; \
233 for f in $(tests); do chmod a-x $$f; done
234 srcdir="$(srcdir)" $(PERL) -I$(srcdir) -I. -e 'use Test::Harness qw(&runtests); runtests(sort @ARGV);' $(tests)
235 rm -rf "$(CONFIG_DIR)/TESTCONF"
236 @if test -f "$(CONFIG_DIR)/amanda-client.conf.install-backup"; then \
237 mv -f "$(CONFIG_DIR)/amanda-client.conf.install-backup" "$(CONFIG_DIR)/amanda-client.conf"; \
239 rm -rf "$(AMANDA_TMPDIR)/installchecks"