Commit 0f83a2bf authored by Nils Goroll's avatar Nils Goroll

use autocrap test facility to get the standard TESTS_ENVIRONMENT

parent 4d6cc159
...@@ -40,6 +40,9 @@ fi ...@@ -40,6 +40,9 @@ fi
AC_HEADER_STDC AC_HEADER_STDC
AC_CHECK_HEADERS([sys/stdlib.h]) AC_CHECK_HEADERS([sys/stdlib.h])
VMOD_TESTS="$(cd $srcdir/src && echo tests/*.vtc)"
AC_SUBST(VMOD_TESTS)
# backwards compat with older pkg-config # backwards compat with older pkg-config
# - pull in AC_DEFUN from pkg.m4 # - pull in AC_DEFUN from pkg.m4
m4_ifndef([PKG_CHECK_VAR], [ m4_ifndef([PKG_CHECK_VAR], [
......
AM_CPPFLAGS = @VMOD_INCLUDES@ -Wall -Werror AM_CPPFLAGS = @VMOD_INCLUDES@ -Wall -Werror
TESTS_ENVIRONMENT = PATH=$(LIBVARNISHAPI_BINDIR):$(LIBVARNISHAPI_SBINDIR):$$PATH
vmoddir = @VMOD_DIR@ vmoddir = @VMOD_DIR@
vmod_LTLIBRARIES = libvmod_example.la vmod_LTLIBRARIES = libvmod_example.la
...@@ -23,13 +25,12 @@ vmod_example.lo vmod_example.man.rst: vcc ...@@ -23,13 +25,12 @@ vmod_example.lo vmod_example.man.rst: vcc
vcc: @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc vcc: @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
@PYTHON@ @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc @PYTHON@ @VMODTOOL@ $(top_srcdir)/src/vmod_example.vcc
VMOD_TESTS = $(top_srcdir)/src/tests/*.vtc VTC_LOG_COMPILER = $(VARNISHTEST) -v \
.PHONY: $(VMOD_TESTS) vcc -Dvmod_topbuild=$(abs_top_builddir)
TEST_EXTENSIONS = .vtc
$(top_srcdir)/src/tests/*.vtc: libvmod_example.la TESTS = @VMOD_TESTS@
@VARNISHTEST@ -Dvarnishd=@VARNISHD@ -Dvmod_topbuild=$(abs_top_builddir) $@
check: $(VMOD_TESTS) @VMOD_TESTS@: vcc
EXTRA_DIST = \ EXTRA_DIST = \
vmod_example.vcc \ vmod_example.vcc \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment