1GNULIB= ../gnulib/lib/libgnu.la 2GNULIB_CFLAGS= -I $(top_srcdir)/gnulib/lib 3 4AM_CFLAGS = $(AUGEAS_CFLAGS) $(WARN_CFLAGS) $(GNULIB_CFLAGS) \ 5 $(LIBXML_CFLAGS) -I $(top_builddir)/src 6 7VALGRIND=libtool --mode=execute valgrind --quiet --leak-check=full 8valgrind: 9 $(MAKE) $(MAKEFLAGS) check \ 10 VALGRIND="$(VALGRIND)" \ 11 AUGPARSE=$(abs_top_builddir)/src/augparse \ 12 AUGTOOL=$(abs_top_builddir)/src/augtool 13 $(VALGRIND) ./fatest 14 15valgrind-leak: leak 16 $(TESTS_ENVIRONMENT) $(VALGRIND) ./leak 17 18lens_tests = \ 19 lens-sudoers.sh \ 20 lens-access.sh \ 21 lens-activemq_conf.sh \ 22 lens-activemq_xml.sh \ 23 lens-afs_cellalias.sh \ 24 lens-aliases.sh \ 25 lens-anaconda.sh \ 26 lens-anacron.sh \ 27 lens-approx.sh \ 28 lens-apt_update_manager.sh \ 29 lens-aptcacherngsecurity.sh \ 30 lens-aptpreferences.sh \ 31 lens-aptconf.sh \ 32 lens-aptsources.sh \ 33 lens-authorized_keys.sh \ 34 lens-automaster.sh \ 35 lens-automounter.sh \ 36 lens-avahi.sh \ 37 lens-backuppchosts.sh \ 38 lens-bbhosts.sh \ 39 lens-bootconf.sh \ 40 lens-build.sh \ 41 lens-cachefilesd.sh \ 42 lens-carbon.sh \ 43 lens-cgconfig.sh \ 44 lens-cgrules.sh \ 45 lens-channels.sh \ 46 lens-chrony.sh \ 47 lens-ceph.sh \ 48 lens-clamav.sh \ 49 lens-cobblersettings.sh \ 50 lens-cobblermodules.sh \ 51 lens-collectd.sh \ 52 lens-cpanel.sh \ 53 lens-cron.sh \ 54 lens-cron_user.sh \ 55 lens-crypttab.sh \ 56 lens-csv.sh \ 57 lens-cyrus_imapd.sh \ 58 lens-cups.sh \ 59 lens-darkice.sh \ 60 lens-debctrl.sh \ 61 lens-desktop.sh \ 62 lens-devfsrules.sh \ 63 lens-device_map.sh \ 64 lens-dhclient.sh \ 65 lens-dhcpd.sh \ 66 lens-dns_zone.sh \ 67 lens-dnsmasq.sh \ 68 lens-dovecot.sh \ 69 lens-dpkg.sh \ 70 lens-dput.sh \ 71 lens-erlang.sh \ 72 lens-ethers.sh \ 73 lens-exports.sh \ 74 lens-fai_diskconfig.sh \ 75 lens-fonts.sh \ 76 lens-fstab.sh \ 77 lens-fuse.sh \ 78 lens-gdm.sh \ 79 lens-getcap.sh \ 80 lens-group.sh \ 81 lens-grubenv.sh \ 82 lens-gshadow.sh \ 83 lens-gtkbookmarks.sh \ 84 lens-json.sh \ 85 lens-hostname.sh \ 86 lens-hosts.sh \ 87 lens-hosts_access.sh \ 88 lens-host_conf.sh \ 89 lens-htpasswd.sh \ 90 lens-httpd.sh \ 91 lens-inetd.sh \ 92 lens-inifile.sh \ 93 lens-inittab.sh \ 94 lens-inputrc.sh \ 95 lens-interfaces.sh \ 96 lens-iptables.sh \ 97 lens-iproute2.sh \ 98 lens-iscsid.sh \ 99 lens-jettyrealm.sh \ 100 lens-jmxaccess.sh \ 101 lens-jmxpassword.sh \ 102 lens-kdump.sh \ 103 lens-keepalived.sh \ 104 lens-known_hosts.sh \ 105 lens-koji.sh \ 106 lens-krb5.sh \ 107 lens-jaas.sh \ 108 lens-ldap.sh \ 109 lens-ldif.sh \ 110 lens-ldso.sh \ 111 lens-lightdm.sh \ 112 lens-limits.sh \ 113 lens-login_defs.sh \ 114 lens-logrotate.sh \ 115 lens-logwatch.sh \ 116 lens-lokkit.sh \ 117 lens-lvm.sh \ 118 lens-mailscanner.sh \ 119 lens-mailscanner_rules.sh \ 120 lens-masterpasswd.sh \ 121 lens-mcollective.sh \ 122 lens-mdadm_conf.sh \ 123 lens-memcached.sh \ 124 lens-mke2fs.sh \ 125 lens-modprobe.sh \ 126 lens-modules.sh \ 127 lens-modules_conf.sh \ 128 lens-mongodbserver.sh \ 129 lens-monit.sh \ 130 lens-multipath.sh \ 131 lens-mysql.sh \ 132 lens-nagioscfg.sh \ 133 lens-nagiosobjects.sh \ 134 lens-netmasks.sh \ 135 lens-networkmanager.sh \ 136 lens-networks.sh \ 137 lens-nginx.sh \ 138 lens-ntp.sh \ 139 lens-ntpd.sh \ 140 lens-nrpe.sh \ 141 lens-nsswitch.sh \ 142 lens-nslcd.sh \ 143 lens-odbc.sh \ 144 lens-opendkim.sh \ 145 lens-openshift_config.sh \ 146 lens-openshift_http.sh \ 147 lens-openshift_quickstarts.sh \ 148 lens-openvpn.sh \ 149 lens-oz.sh \ 150 lens-pagekite.sh \ 151 lens-pam.sh \ 152 lens-pamconf.sh \ 153 lens-passwd.sh \ 154 lens-pbuilder.sh \ 155 lens-pg_hba.sh \ 156 lens-pgbouncer.sh \ 157 lens-php.sh \ 158 lens-phpvars.sh \ 159 lens-postfix_access.sh \ 160 lens-postfix_main.sh \ 161 lens-postfix_master.sh \ 162 lens-postfix_passwordmap.sh \ 163 lens-postfix_sasl_smtpd.sh \ 164 lens-postfix_transport.sh \ 165 lens-postfix_virtual.sh \ 166 lens-postgresql.sh \ 167 lens-properties.sh \ 168 lens-protocols.sh \ 169 lens-puppet.sh \ 170 lens-puppet_auth.sh \ 171 lens-puppetfile.sh \ 172 lens-puppetfileserver.sh \ 173 lens-pylonspaste.sh \ 174 lens-pythonpaste.sh \ 175 lens-qpid.sh \ 176 lens-quote.sh \ 177 lens-rabbitmq.sh \ 178 lens-radicale.sh \ 179 lens-rancid.sh \ 180 lens-redis.sh \ 181 lens-reprepro_uploaders.sh \ 182 lens-resolv.sh \ 183 lens-rhsm.sh \ 184 lens-rmt.sh \ 185 lens-rsyncd.sh \ 186 lens-rsyslog.sh \ 187 lens-rtadvd.sh \ 188 lens-rx.sh \ 189 lens-samba.sh \ 190 lens-securetty.sh \ 191 lens-semanage.sh \ 192 lens-services.sh \ 193 lens-shadow.sh \ 194 lens-shells.sh \ 195 lens-shellvars.sh \ 196 lens-shellvars_list.sh \ 197 lens-simplelines.sh \ 198 lens-simplevars.sh \ 199 lens-sip_conf.sh \ 200 lens-slapd.sh \ 201 lens-smbusers.sh \ 202 lens-solaris_system.sh \ 203 lens-soma.sh \ 204 lens-spacevars.sh \ 205 lens-splunk.sh \ 206 lens-squid.sh \ 207 lens-ssh.sh \ 208 lens-sshd.sh \ 209 lens-sssd.sh \ 210 lens-star.sh \ 211 lens-strongswan.sh \ 212 lens-stunnel.sh \ 213 lens-subversion.sh \ 214 lens-sysconfig.sh \ 215 lens-sysconfig_route.sh \ 216 lens-syslog.sh \ 217 lens-sysctl.sh \ 218 lens-systemd.sh \ 219 lens-termcap.sh \ 220 lens-thttpd.sh \ 221 lens-tmpfiles.sh \ 222 lens-trapperkeeper.sh \ 223 lens-toml.sh \ 224 lens-tuned.sh \ 225 lens-up2date.sh \ 226 lens-updatedb.sh \ 227 lens-util.sh \ 228 lens-vfstab.sh \ 229 lens-vmware_config.sh \ 230 lens-vsftpd.sh \ 231 lens-webmin.sh \ 232 lens-wine.sh \ 233 lens-xinetd.sh \ 234 lens-xml.sh \ 235 lens-xorg.sh \ 236 lens-xymon.sh \ 237 lens-xymon_alerting.sh \ 238 lens-grub.sh \ 239 lens-schroot.sh \ 240 lens-xendconfsxp.sh \ 241 lens-yaml.sh \ 242 lens-yum.sh 243 244ME = tests/Makefile.am 245 246# Ensure that the above list stays up to date: 247# Construct two lists: list of lens-*.sh from lens_tests = ... above, 248# and the list of ../lenses/tests/test_*.aug names. 249# If they're not the same, print the new or removed names and fail. 250check: check-lens-tests 251.PHONY: check-lens-tests 252_v = lens_tests 253check-lens-tests: 254 @u=$$({ sed -n '/^$(_v) =[ ]*\\$$/,/[^\]$$/p' \ 255 $(srcdir)/Makefile.am \ 256 | sed 's/^ *//;/^\$$.*/d;/^$(_v) =/d' \ 257 | sed 's,\.sh.*\\,.sh,'; \ 258 ls -1 $(srcdir)/../lenses/tests/test_*.aug \ 259 | sed 's,.*/test_\([^./]*\)\.aug$$,lens-\1.sh,'; \ 260 } | LC_ALL=C sort | uniq -u); \ 261 test "x$$u" = x && : \ 262 || { printf '%s\n' "$$u" >&2; \ 263 echo '$(ME): new test(s)? update lens_tests' >&2; exit 1; } 264 265DISTCLEANFILES = $(lens_tests) 266$(lens_tests): lens-test-1 267 rm -f $@ 268 $(LN_S) $< $@ 269 270check_SCRIPTS = \ 271 test-interpreter.sh \ 272 $(lens_tests) \ 273 test-get.sh test-augtool.sh \ 274 test-put-symlink.sh test-put-symlink-augnew.sh \ 275 test-put-symlink-augsave.sh test-put-symlink-augtemp.sh \ 276 test-put-mount.sh test-put-mount-augnew.sh test-put-mount-augsave.sh \ 277 test-save-empty.sh test-bug-1.sh test-idempotent.sh test-preserve.sh \ 278 test-events-saved.sh test-save-mode.sh test-unlink-error.sh \ 279 test-augtool-empty-line.sh test-augtool-modify-root.sh \ 280 test-span-rec-lens.sh test-nonwritable.sh test-augmatch.sh 281 282EXTRA_DIST = \ 283 test-augtool root lens-test-1 \ 284 $(check_SCRIPTS) $(wildcard modules/*.aug) xpath.tests run.tests 285 286noinst_SCRIPTS = $(check_SCRIPTS) 287 288noinst_PROGRAMS = leak 289 290check_PROGRAMS = fatest test-xpath test-load test-perf test-save test-api test-run 291 292TESTS_ENVIRONMENT = \ 293 PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \ 294 abs_top_builddir='$(abs_top_builddir)' \ 295 abs_top_srcdir='$(abs_top_srcdir)' \ 296 LANG=en_US 297 298TESTS = $(check_SCRIPTS) $(check_PROGRAMS) 299 300INCLUDES = -I$(top_srcdir)/src 301 302fatest_SOURCES = fatest.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h 303fatest_LDADD = $(top_builddir)/src/libfa.la $(LIBXML_LIBS) $(GNULIB) 304 305test_xpath_SOURCES = test-xpath.c cutest.c cutest.h $(top_srcdir)/src/memory.c 306test_xpath_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) 307 308test_load_SOURCES = test-load.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h 309test_load_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) 310 311test_save_SOURCES = test-save.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h 312test_save_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) 313 314test_api_SOURCES = test-api.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h 315test_api_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) 316 317test_run_SOURCES = test-run.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h 318test_run_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) 319 320test_perf_SOURCES = test-perf.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h 321test_perf_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) 322 323leak_SOURCES = leak.c 324leak_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) 325 326FAILMALLOC_START ?= 1 327FAILMALLOC_REP ?= 20 328FAILMALLOC_PROG ?= ./fatest 329 330include $(top_srcdir)/Makefile.inc 331