aboutsummaryrefslogtreecommitdiff
path: root/tests/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am79
1 files changed, 57 insertions, 22 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 413d176..30b0360 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,5 @@
# This file is part of vmod-tbf
-# Copyright (C) 2013-2016 Sergey Poznyakoff
+# Copyright (C) 2013-2017 Sergey Poznyakoff
#
# Vmod-tbf is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,29 +14,64 @@
# You should have received a copy of the GNU General Public License
# along with vmod-tbf. If not, see <http://www.gnu.org/licenses/>.
-VMOD_TESTS = \
- test00.vtc\
- test01.vtc\
- test02.vtc\
- test03.vtc\
- test05.vtc\
- time00.vtc
+EXTRA_DIST = $(TESTSUITE_AT) testsuite package.m4
+DISTCLEANFILES = atconfig $(check_SCRIPTS)
+MAINTAINERCLEANFILES = Makefile.in $(TESTSUITE)
+CLEANFILES = .TESTINIT FAILURE
-EXTRA_DIST=$(VMOD_TESTS)
+## ------------ ##
+## package.m4. ##
+## ------------ ##
+
+$(srcdir)/package.m4: $(top_srcdir)/configure.ac
+ $(AM_V_GEN){ \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], [@PACKAGE_NAME@])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [@PACKAGE_TARNAME@])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], [@PACKAGE_VERSION@])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], [@PACKAGE_STRING@])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [@PACKAGE_BUGREPORT@])'; \
+ } >$(srcdir)/package.m4
+
+#
+
+## ------------ ##
+## Test suite. ##
+## ------------ ##
+
+TESTSUITE_AT = \
+ testsuite.at\
+ rate.at\
+ ratef.at\
+ check.at\
+ checkf.at\
+ dump.at\
+ strftime.at
+
+TESTSUITE = $(srcdir)/testsuite
+M4=m4
+
+AUTOTEST = $(AUTOM4TE) --language=autotest
+$(TESTSUITE): package.m4 $(TESTSUITE_AT)
+ $(AM_V_GEN)$(AUTOTEST) -I $(srcdir) testsuite.at -o $@.tmp
+ $(AM_V_at)mv $@.tmp $@
+
+atconfig: $(top_builddir)/config.status
+ @cd $(top_builddir) && ./config.status tests/$@
+
+clean-local:
+ @test ! -f $(TESTSUITE) || $(SHELL) $(TESTSUITE) --clean
+
+check-local: atconfig atlocal $(TESTSUITE)
+ @$(SHELL) $(TESTSUITE)
+
+# Run the test suite on the *installed* tree.
+#installcheck-local:
+# $(SHELL) $(TESTSUITE) AUTOTEST_PATH=$(exec_prefix)/bin
distclean-local:
$(AM_V_at)rm -fr tbf
-check: $(BUILT_TESTS)
- $(AM_V_at)for t in $(VMOD_TESTS); do \
- n=$${t%%.vti}; \
- if [ $$n != $$t ]; then \
- t=$(abs_builddir)/$${n}.vtc;\
- else \
- t=$(abs_srcdir)/$$t;\
- fi; \
- $(VARNISHSRC)/bin/varnishtest/varnishtest \
- -Dvarnishd=$(VARNISHSRC)/bin/varnishd/varnishd \
- -Dvmod_topsrc=$(abs_top_srcdir) \
- -Dvmod_topbuild=$(abs_top_builddir) $$t; \
- done
+
+
+

Return to:

Send suggestions and report system problems to the System administrator.