summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2017-08-04 14:38:17 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2017-08-04 14:39:46 (GMT)
commite2e9e4647ae1baf3de116bc52f1f73b8cf221c76 (patch) (side-by-side diff)
tree4c7f88a92aed8ebe28d1e0584737bbe9ec1d2689
parent9d9f34d1ef0483fc012ea283e649d507ff410638 (diff)
downloadvmod-variable-e2e9e4647ae1baf3de116bc52f1f73b8cf221c76.tar.gz
vmod-variable-e2e9e4647ae1baf3de116bc52f1f73b8cf221c76.tar.bz2
Switch to new acvmod
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile.am27
m---------acvmod0
-rw-r--r--configure.ac6
-rw-r--r--git2chg.awk75
-rw-r--r--src/Makefile.am36
-rw-r--r--src/variable.c39
-rw-r--r--src/variable.vcc20
-rw-r--r--tests/atlocal.in7
-rw-r--r--tests/clear.at4
-rw-r--r--tests/complex.at4
-rw-r--r--tests/defined.at4
-rw-r--r--tests/duration.at4
-rw-r--r--tests/gstring.at4
-rw-r--r--tests/int.at4
-rw-r--r--tests/queryset00.at6
-rw-r--r--tests/queryset01.at6
-rw-r--r--tests/real.at4
-rw-r--r--tests/regset.at6
-rw-r--r--tests/string.at4
-rw-r--r--tests/testsuite.at48
-rw-r--r--tests/type_of.at4
-rw-r--r--tests/unset.at4
22 files changed, 112 insertions, 204 deletions
diff --git a/Makefile.am b/Makefile.am
index 9afba47..dc90c44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
-# This file is part of vmod-variable
-# Copyright (C) 2013-2016 Sergey Poznyakoff
-#
-# Vmod-variable is free software; you can redistribute it and/or modify
+# This file is part of vmod_variable.
+# Copyright (C) 2017 Sergey Poznyakoff
+#
+# Vmod_variable is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -7,4 +7,4 @@
# any later version.
-#
-# Vmod-variable is distributed in the hope that it will be useful,
+#
+# Vmod_variable is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -12,5 +12,6 @@
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
-# along with vmod-variable. If not, see <http://www.gnu.org/licenses/>.
+# along with vmod_variable. If not, see <http://www.gnu.org/licenses/>.
+
ACLOCAL_AMFLAGS = -I m4 -I acvmod
@@ -19,12 +20,4 @@ SUBDIRS = src tests
-AM_DISTCHECK_CONFIGURE_FLAGS=--without-vmoddir
-
-EXTRA_DIST=git2chg.awk
+include acvmod/top.am
-.PHONY: ChangeLog
-ChangeLog:
- $(AM_V_GEN)if test -d .git; then \
- git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \
- awk -f $(top_srcdir)/git2chg.awk > ChangeLog; \
- fi
diff --git a/acvmod b/acvmod
-Subproject f064cf4d7aa1ead1f8607b8b72baf883f015ffc
+Subproject 7cbce8ec30898fcc19e3ba25f367156a5859ea8
diff --git a/configure.ac b/configure.ac
index ca5c8f7..2f163d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autoconf -*-
-# Copyright (C) 2015-2016 Sergey Poznyakoff
+# Copyright (C) 2015-2017 Sergey Poznyakoff
#
@@ -16,3 +16,3 @@
AC_PREREQ(2.69)
-AC_INIT([vmod-variable], [1.0.90-4.1.0], [gray@gnu.org])
+AC_INIT([vmod-variable], [1.0.92], [gray@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
@@ -51,3 +51,3 @@ AC_CHECK_LIB(pcre, pcre_compile,,
-AM_VARNISHAPI
+AM_VARNISHAPI([4.1])
diff --git a/git2chg.awk b/git2chg.awk
deleted file mode 100644
index 1e75254..0000000
--- a/git2chg.awk
+++ b/dev/null
@@ -1,75 +0,0 @@
-# This file is part of grecs
-# Copyright (C) 2007, 2009-2012 Sergey Poznyakoff
-#
-# Grecs is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# Grecs is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
-
-BEGIN {
- if (since)
- split(since,since_a,"-")
-}
-
-function timeok(t, a) {
- if (!since)
- return 1
- split(t,a,"-")
- if (a[1] < since_a[1])
- return 0
- if (a[1] > since_a[1])
- return 1
- if (a[2] < since_a[2])
- return 0
- if (a[2] > since_a[2])
- return 1
- return a[3] > since_a[3]
-}
-
-/^[0-9]+ .* +<[^>]+>/ {
- s = strftime("%F", $1)
- if (!timeok(s))
- exit
- sub(/^[0-9]+ +/,"")
- if (s == datestr && author == $0)
- next
- datestr = s
- author = $0
- if (runlen) { runlen = 0; print "" }
- printf("%s %s\n", datestr, author)
- next
-}
-/^Signed-off-by:/ { next }
-/^<unknown>$/ { next }
-NF==0 {
- runlen++
- next
-}
-{ if (runlen) { runlen = 0; print "" }
- print "\t" $0 }
-
-END {
- if (append) {
- print ""
- while ((getline < append) > 0) {
- if (match($0, /^Local *Variables:/))
- break
- print
- }
- }
- print "\f"
- # Make sure Emacs won't recognize this line:
- print "Local", "Variables:"
- print "mode: change-log"
- print "version-control: never"
- print "buffer-read-only: t"
- print "End:"
-}
diff --git a/src/Makefile.am b/src/Makefile.am
index 5396773..bf5eee8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,5 @@
-# This file is part of vmod-variable
-# Copyright (C) 2015, 2016 Sergey Poznyakoff
-#
-# Vmod-variable is free software; you can redistribute it and/or modify
+# This file is part of vmod_variable.
+# Copyright (C) 2017 Sergey Poznyakoff
+#
+# Vmod_variable is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -7,4 +7,4 @@
# any later version.
-#
-# Vmod-variable is distributed in the hope that it will be useful,
+#
+# Vmod_variable is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -12,14 +12,10 @@
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
-# along with vmod-variable. If not, see <http://www.gnu.org/licenses/>.
+# along with vmod_variable. If not, see <http://www.gnu.org/licenses/>.
AM_CPPFLAGS=\
- -I$(VARNISHSRC)/include\
- -I$(VARNISHSRC)/bin/varnishd\
- -I$(VARNISHSRC)\
+ $(VARNISHAPI_CFLAGS)\
-DLOCALSTATEDIR=\"$(localstatedir)\"
-dist_man_MANS=vmod-variable.3 vmod_variable.3
-
vmoddir = $(VMODDIR)
@@ -40,3 +36,2 @@ CLEANFILES = vcc_if.c vcc_if.h *.rst
-vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py
vmodtoolargs = --strict
@@ -44,7 +39,14 @@ vccfile = $(top_srcdir)/src/variable.vcc
-vcc_if.c vcc_if.h: $(vmodtool) $(vccfile)
- $(AM_V_GEN)$(PYTHON) $(vmodtool) $(vmodtoolargs) $(vccfile)
+vcc_if.c vcc_if.h: $(vccfile)
+ $(AM_V_GEN)$(PYTHON) $(VARNISHAPI_VMODTOOL) $(vmodtoolargs) $(vccfile)
EXTRA_DIST = \
- variable.vcc
+ variable.vcc\
+ vmod_variable.man.rst\
+ vmod_variable.rst
+
+dist_man_MANS=vmod_variable.3 vmod-variable.3
+
+DISTCLEANFILES=vmod_variable.3
+
diff --git a/src/variable.c b/src/variable.c
index 8e75ea2..feaaa21 100644
--- a/src/variable.c
+++ b/src/variable.c
@@ -1,3 +1,3 @@
/* This file is part of vmod-variable
- Copyright (C) 2013-2016 Sergey Poznyakoff
+ Copyright (C) 2013-2017 Sergey Poznyakoff
@@ -26,5 +26,4 @@
#include "pthread.h"
+#include "cache/cache.h"
-#include "bin/varnishd/cache/cache.h"
-#define VARIABLE_CTX const struct vrt_ctx *
#define WSPTR(s) ((s)->ws)
@@ -310,3 +309,3 @@ static pthread_mutex_t global_mtx = PTHREAD_MUTEX_INITIALIZER;
VCL_VOID
-vmod_global_set(VARIABLE_CTX ctx, VCL_STRING name, VCL_STRING value)
+vmod_global_set(VRT_CTX, VCL_STRING name, VCL_STRING value)
{
@@ -333,3 +332,3 @@ vmod_global_set(VARIABLE_CTX ctx, VCL_STRING name, VCL_STRING value)
VCL_STRING
-vmod_global_get(VARIABLE_CTX ctx, VCL_STRING name)
+vmod_global_get(VRT_CTX, VCL_STRING name)
{
@@ -352,3 +351,3 @@ vmod_global_get(VARIABLE_CTX ctx, VCL_STRING name)
VCL_BOOL
-vmod_global_defined(VARIABLE_CTX ctx, VCL_STRING name)
+vmod_global_defined(VRT_CTX, VCL_STRING name)
{
@@ -358,3 +357,3 @@ vmod_global_defined(VARIABLE_CTX ctx, VCL_STRING name)
VCL_VOID
-vmod_global_clear(VARIABLE_CTX ctx)
+vmod_global_clear(VRT_CTX)
{
@@ -366,3 +365,3 @@ vmod_global_clear(VARIABLE_CTX ctx)
VCL_VOID
-vmod_global_unset(VARIABLE_CTX ctx, VCL_STRING name)
+vmod_global_unset(VRT_CTX, VCL_STRING name)
{
@@ -408,3 +407,3 @@ defvar(struct symtab *vt, const char *name, enum variable_type t,
VCL_VOID
-vmod_clear(VARIABLE_CTX ctx, struct vmod_priv *priv)
+vmod_clear(VRT_CTX, struct vmod_priv *priv)
{
@@ -414,3 +413,3 @@ vmod_clear(VARIABLE_CTX ctx, struct vmod_priv *priv)
VCL_STRING
-vmod_get_string(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_get_string(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -423,3 +422,3 @@ vmod_get_string(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_VOID
-vmod_set_string(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_set_string(VRT_CTX, struct vmod_priv *priv,
VCL_STRING name, VCL_STRING value)
@@ -434,3 +433,3 @@ vmod_set_string(VARIABLE_CTX ctx, struct vmod_priv *priv,
VCL_STRING
-vmod_get(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_get(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -440,3 +439,3 @@ vmod_get(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_VOID
-vmod_set(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_set(VRT_CTX, struct vmod_priv *priv,
VCL_STRING name, VCL_STRING value)
@@ -449,3 +448,3 @@ vmod_set(VARIABLE_CTX ctx, struct vmod_priv *priv,
vcl_type \
-__cat__(vmod_get_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \
+__cat__(vmod_get_,r_type)(VRT_CTX, struct vmod_priv *priv, \
VCL_STRING name) \
@@ -460,3 +459,3 @@ __cat__(vmod_get_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \
VCL_VOID \
-__cat__(vmod_set_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \
+__cat__(vmod_set_,r_type)(VRT_CTX, struct vmod_priv *priv, \
VCL_STRING name, \
@@ -479,3 +478,3 @@ DEF(duration, VCL_DURATION, d)
VCL_BOOL
-vmod_defined(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_defined(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -485,3 +484,3 @@ vmod_defined(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_STRING
-vmod_type_of(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_type_of(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -492,3 +491,3 @@ vmod_type_of(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
VCL_VOID
-vmod_unset(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
+vmod_unset(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
{
@@ -706,3 +705,3 @@ setval(union value *val, const char *s, enum variable_type type, char **err)
VCL_VOID
-vmod_regset(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_regset(VRT_CTX, struct vmod_priv *priv,
VCL_STRING vars, VCL_STRING rxs, VCL_STRING input)
@@ -882,3 +881,3 @@ define_param(struct symtab *vt, struct vardef *def,
VCL_VOID
-vmod_queryset(VARIABLE_CTX ctx, struct vmod_priv *priv,
+vmod_queryset(VRT_CTX, struct vmod_priv *priv,
VCL_STRING vars, VCL_STRING query)
diff --git a/src/variable.vcc b/src/variable.vcc
index b2888fa..c309218 100644
--- a/src/variable.vcc
+++ b/src/variable.vcc
@@ -1,3 +1,3 @@
# This file is part of vmod-variable
-# Copyright (C) 2015, 2016 Sergey Poznyakoff
+# Copyright (C) 2015-2017 Sergey Poznyakoff
#
@@ -25,13 +25,25 @@ For a detailed documentation, please see vmod-variable(3) manual page.
$Function VOID set(PRIV_TASK, STRING, STRING)
+
$Function STRING get(PRIV_TASK, STRING)
+
$Function VOID global_set(STRING, STRING)
+
$Function STRING global_get(STRING)
+
$Function VOID set_int(PRIV_TASK, STRING, INT)
+
$Function INT get_int(PRIV_TASK, STRING)
+
$Function VOID set_string(PRIV_TASK, STRING, STRING)
+
$Function STRING get_string(PRIV_TASK, STRING)
+
$Function VOID set_real(PRIV_TASK, STRING, REAL)
+
$Function REAL get_real(PRIV_TASK, STRING)
+
$Function VOID set_duration(PRIV_TASK, STRING, DURATION)
+
$Function DURATION get_duration(PRIV_TASK, STRING)
+
$Function VOID clear(PRIV_TASK)
@@ -39,3 +51,5 @@ $Function VOID clear(PRIV_TASK)
$Function VOID global_clear()
+
$Function BOOL global_defined(STRING)
+
$Function VOID global_unset(STRING)
@@ -43,5 +57,9 @@ $Function VOID global_unset(STRING)
$Function BOOL defined(PRIV_TASK, STRING)
+
$Function STRING type_of(PRIV_TASK, STRING)
+
$Function VOID unset(PRIV_TASK, STRING)
+
$Function VOID regset(PRIV_TASK, STRING, STRING, STRING)
+
$Function VOID queryset(PRIV_TASK, STRING, STRING)
diff --git a/tests/atlocal.in b/tests/atlocal.in
index 6cae626..f229f09 100644
--- a/tests/atlocal.in
+++ b/tests/atlocal.in
@@ -2,9 +2,8 @@
# Configurable variable values for vmod-variable test suite.
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH
+VARNISHTEST=@VARNISHTEST@
+VARNISHD=@VARNISHD@
INITFILE=@abs_builddir@/.TESTINIT
FAILFILE=@abs_builddir@/FAILURE
-VARNISHTEST="@VARNISHSRC@/bin/varnishtest/varnishtest -Dvarnishd=@VARNISHSRC@/bin/varnishd/varnishd"
-VARNISHVERSION=@VARNISHVERSION@
-
diff --git a/tests/clear.at b/tests/clear.at
index a3c602f..3705c64 100644
--- a/tests/clear.at
+++ b/tests/clear.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(clear)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/complex.at b/tests/complex.at
index 77a7903..16fe573 100644
--- a/tests/complex.at
+++ b/tests/complex.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(complex)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/defined.at b/tests/defined.at
index 36fbe7f..3d0d071 100644
--- a/tests/defined.at
+++ b/tests/defined.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(defined)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/duration.at b/tests/duration.at
index 5368145..0a3f1b7 100644
--- a/tests/duration.at
+++ b/tests/duration.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(duration)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/gstring.at b/tests/gstring.at
index 8a93dfe..bcf7beb 100644
--- a/tests/gstring.at
+++ b/tests/gstring.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(global string gstring)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/int.at b/tests/int.at
index 7b193cf..1a7a50b 100644
--- a/tests/int.at
+++ b/tests/int.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(int)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/queryset00.at b/tests/queryset00.at
index f56e19a..230f0a5 100644
--- a/tests/queryset00.at
+++ b/tests/queryset00.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(queryset queryset00)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
@@ -38,2 +38,2 @@ AT_CLEANUP
- \ No newline at end of file
+
diff --git a/tests/queryset01.at b/tests/queryset01.at
index 4f70ae2..3a9b7fb 100644
--- a/tests/queryset01.at
+++ b/tests/queryset01.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(queryset queryset01)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
@@ -38,2 +38,2 @@ AT_CLEANUP
- \ No newline at end of file
+
diff --git a/tests/real.at b/tests/real.at
index 3500480..6692991 100644
--- a/tests/real.at
+++ b/tests/real.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(real)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/regset.at b/tests/regset.at
index cc92578..d942ad2 100644
--- a/tests/regset.at
+++ b/tests/regset.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(regset)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
@@ -38,2 +38,2 @@ AT_CLEANUP
- \ No newline at end of file
+
diff --git a/tests/string.at b/tests/string.at
index 698ca4a..8d9c82e 100644
--- a/tests/string.at
+++ b/tests/string.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(string)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/testsuite.at b/tests/testsuite.at
index 4f39be9..6b6c14f 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -1,5 +1,5 @@
-# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
-#
-# Vmod-variable is free software; you can redistribute it and/or modify
+# This file is part of vmod_variable.
+# Copyright (C) 2017 Sergey Poznyakoff
+#
+# Vmod_variable is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -7,4 +7,4 @@
# any later version.
-#
-# Vmod-variable is distributed in the hope that it will be useful,
+#
+# Vmod_variable is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -12,37 +12,9 @@
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
-# along with vmod-variable. If not, see <http://www.gnu.org/licenses/>.
-
-m4_version_prereq([2.52g])
-
-m4_define([AT_SKIP_TEST],[exit 77])
-
-dnl AT_VARNISHTEST(VCL, CLT[, SRV])
-m4_define([AT_VARNISHTEST],[
-AT_CHECK([
-cat > test.vtc <<EOT
-server s1 {
-m4_if($3,,[dnl
- rxreq
- txresp],[$3])
-} -start
-
-varnish v1 -vcl+backend {
- import std;
- import variable from "$abs_top_builddir/src/.libs/libvmod_variable.so";
-$1
-} -start
-
-client c1 {
-$2
-} -run
-EOT
-$VARNISHTEST test.vtc | sed 's/^#.*TEST test.vtc passed.*/OK/'
-],
-[0],
-[OK
-])])
+# along with vmod_variable. If not, see <http://www.gnu.org/licenses/>.
+m4_include([../acvmod/testsuite.inc])
AT_INIT
+# Include your tests here
m4_include([string.at])
diff --git a/tests/type_of.at b/tests/type_of.at
index 8d8b7e8..a67507e 100644
--- a/tests/type_of.at
+++ b/tests/type_of.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(type_of)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {
diff --git a/tests/unset.at b/tests/unset.at
index 5d88e06..330b852 100644
--- a/tests/unset.at
+++ b/tests/unset.at
@@ -1,3 +1,3 @@
# This file is part of vmod-variable -*- autotest -*-
-# Copyright (C) 2015 Sergey Poznyakoff
+# Copyright (C) 2015, 2017 Sergey Poznyakoff
#
@@ -19,3 +19,3 @@ AT_KEYWORDS(unset)
-AT_VARNISHTEST([
+AT_VARNISHTEST([variable],[
sub vcl_recv {

Return to:

Send suggestions and report system problems to the System administrator.