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) (unidiff)
tree4c7f88a92aed8ebe28d1e0584737bbe9ec1d2689
parent9d9f34d1ef0483fc012ea283e649d507ff410638 (diff)
downloadvmod-variable-e2e9e4647ae1baf3de116bc52f1f73b8cf221c76.tar.gz
vmod-variable-e2e9e4647ae1baf3de116bc52f1f73b8cf221c76.tar.bz2
Switch to new acvmod
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--Makefile.am21
m---------acvmod0
-rw-r--r--configure.ac6
-rw-r--r--git2chg.awk75
-rw-r--r--src/Makefile.am30
-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.at4
-rw-r--r--tests/queryset01.at4
-rw-r--r--tests/real.at4
-rw-r--r--tests/regset.at4
-rw-r--r--tests/string.at4
-rw-r--r--tests/testsuite.at42
-rw-r--r--tests/type_of.at4
-rw-r--r--tests/unset.at4
22 files changed, 100 insertions, 192 deletions
diff --git a/Makefile.am b/Makefile.am
index 9afba47..dc90c44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
1# This file is part of vmod-variable 1# This file is part of vmod_variable.
2# Copyright (C) 2013-2016 Sergey Poznyakoff 2# Copyright (C) 2017 Sergey Poznyakoff
3# 3#
4# Vmod-variable is free software; you can redistribute it and/or modify 4# Vmod_variable is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -8,3 +8,3 @@
8# 8#
9# Vmod-variable is distributed in the hope that it will be useful, 9# Vmod_variable is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,3 +14,4 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with vmod-variable. If not, see <http://www.gnu.org/licenses/>. 15# along with vmod_variable. If not, see <http://www.gnu.org/licenses/>.
16
16ACLOCAL_AMFLAGS = -I m4 -I acvmod 17ACLOCAL_AMFLAGS = -I m4 -I acvmod
@@ -19,12 +20,4 @@ SUBDIRS = src tests
19 20
20AM_DISTCHECK_CONFIGURE_FLAGS=--without-vmoddir 21include acvmod/top.am
21
22EXTRA_DIST=git2chg.awk
23 22
24.PHONY: ChangeLog
25ChangeLog:
26 $(AM_V_GEN)if test -d .git; then \
27 git log --pretty='format:%ct %an <%ae>%n%n%s%n%n%b%n' | \
28 awk -f $(top_srcdir)/git2chg.awk > ChangeLog; \
29 fi
30 23
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 @@
1# This file is part of vmod-variable -*- autoconf -*- 1# This file is part of vmod-variable -*- autoconf -*-
2# Copyright (C) 2015-2016 Sergey Poznyakoff 2# Copyright (C) 2015-2017 Sergey Poznyakoff
3# 3#
@@ -16,3 +16,3 @@
16AC_PREREQ(2.69) 16AC_PREREQ(2.69)
17AC_INIT([vmod-variable], [1.0.90-4.1.0], [gray@gnu.org]) 17AC_INIT([vmod-variable], [1.0.92], [gray@gnu.org])
18AC_CONFIG_AUX_DIR([build-aux]) 18AC_CONFIG_AUX_DIR([build-aux])
@@ -51,3 +51,3 @@ AC_CHECK_LIB(pcre, pcre_compile,,
51 51
52AM_VARNISHAPI 52AM_VARNISHAPI([4.1])
53 53
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 @@
1# This file is part of grecs
2# Copyright (C) 2007, 2009-2012 Sergey Poznyakoff
3#
4# Grecs is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Grecs is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
16
17BEGIN {
18 if (since)
19 split(since,since_a,"-")
20}
21
22function timeok(t, a) {
23 if (!since)
24 return 1
25 split(t,a,"-")
26 if (a[1] < since_a[1])
27 return 0
28 if (a[1] > since_a[1])
29 return 1
30 if (a[2] < since_a[2])
31 return 0
32 if (a[2] > since_a[2])
33 return 1
34 return a[3] > since_a[3]
35}
36
37/^[0-9]+ .* +<[^>]+>/ {
38 s = strftime("%F", $1)
39 if (!timeok(s))
40 exit
41 sub(/^[0-9]+ +/,"")
42 if (s == datestr && author == $0)
43 next
44 datestr = s
45 author = $0
46 if (runlen) { runlen = 0; print "" }
47 printf("%s %s\n", datestr, author)
48 next
49}
50/^Signed-off-by:/ { next }
51/^<unknown>$/ { next }
52NF==0 {
53 runlen++
54 next
55}
56{ if (runlen) { runlen = 0; print "" }
57 print "\t" $0 }
58
59END {
60 if (append) {
61 print ""
62 while ((getline < append) > 0) {
63 if (match($0, /^Local *Variables:/))
64 break
65 print
66 }
67 }
68 print "\f"
69 # Make sure Emacs won't recognize this line:
70 print "Local", "Variables:"
71 print "mode: change-log"
72 print "version-control: never"
73 print "buffer-read-only: t"
74 print "End:"
75}
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 @@
1# This file is part of vmod-variable 1# This file is part of vmod_variable.
2# Copyright (C) 2015, 2016 Sergey Poznyakoff 2# Copyright (C) 2017 Sergey Poznyakoff
3# 3#
4# Vmod-variable is free software; you can redistribute it and/or modify 4# Vmod_variable is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -8,3 +8,3 @@
8# 8#
9# Vmod-variable is distributed in the hope that it will be useful, 9# Vmod_variable is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,12 +14,8 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with vmod-variable. If not, see <http://www.gnu.org/licenses/>. 15# along with vmod_variable. If not, see <http://www.gnu.org/licenses/>.
16 16
17AM_CPPFLAGS=\ 17AM_CPPFLAGS=\
18 -I$(VARNISHSRC)/include\ 18 $(VARNISHAPI_CFLAGS)\
19 -I$(VARNISHSRC)/bin/varnishd\
20 -I$(VARNISHSRC)\
21 -DLOCALSTATEDIR=\"$(localstatedir)\" 19 -DLOCALSTATEDIR=\"$(localstatedir)\"
22 20
23dist_man_MANS=vmod-variable.3 vmod_variable.3
24
25vmoddir = $(VMODDIR) 21vmoddir = $(VMODDIR)
@@ -40,3 +36,2 @@ CLEANFILES = vcc_if.c vcc_if.h *.rst
40 36
41vmodtool = $(VARNISHSRC)/lib/libvcc/vmodtool.py
42vmodtoolargs = --strict 37vmodtoolargs = --strict
@@ -44,7 +39,14 @@ vccfile = $(top_srcdir)/src/variable.vcc
44 39
45vcc_if.c vcc_if.h: $(vmodtool) $(vccfile) 40vcc_if.c vcc_if.h: $(vccfile)
46 $(AM_V_GEN)$(PYTHON) $(vmodtool) $(vmodtoolargs) $(vccfile) 41 $(AM_V_GEN)$(PYTHON) $(VARNISHAPI_VMODTOOL) $(vmodtoolargs) $(vccfile)
47 42
48EXTRA_DIST = \ 43EXTRA_DIST = \
49 variable.vcc 44 variable.vcc\
45 vmod_variable.man.rst\
46 vmod_variable.rst
47
48dist_man_MANS=vmod_variable.3 vmod-variable.3
49
50DISTCLEANFILES=vmod_variable.3
51
50 52
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 @@
1/* This file is part of vmod-variable 1/* This file is part of vmod-variable
2 Copyright (C) 2013-2016 Sergey Poznyakoff 2 Copyright (C) 2013-2017 Sergey Poznyakoff
3 3
@@ -26,5 +26,4 @@
26#include "pthread.h" 26#include "pthread.h"
27#include "cache/cache.h"
27 28
28#include "bin/varnishd/cache/cache.h"
29#define VARIABLE_CTX const struct vrt_ctx *
30#define WSPTR(s) ((s)->ws) 29#define WSPTR(s) ((s)->ws)
@@ -310,3 +309,3 @@ static pthread_mutex_t global_mtx = PTHREAD_MUTEX_INITIALIZER;
310VCL_VOID 309VCL_VOID
311vmod_global_set(VARIABLE_CTX ctx, VCL_STRING name, VCL_STRING value) 310vmod_global_set(VRT_CTX, VCL_STRING name, VCL_STRING value)
312{ 311{
@@ -333,3 +332,3 @@ vmod_global_set(VARIABLE_CTX ctx, VCL_STRING name, VCL_STRING value)
333VCL_STRING 332VCL_STRING
334vmod_global_get(VARIABLE_CTX ctx, VCL_STRING name) 333vmod_global_get(VRT_CTX, VCL_STRING name)
335{ 334{
@@ -352,3 +351,3 @@ vmod_global_get(VARIABLE_CTX ctx, VCL_STRING name)
352VCL_BOOL 351VCL_BOOL
353vmod_global_defined(VARIABLE_CTX ctx, VCL_STRING name) 352vmod_global_defined(VRT_CTX, VCL_STRING name)
354{ 353{
@@ -358,3 +357,3 @@ vmod_global_defined(VARIABLE_CTX ctx, VCL_STRING name)
358VCL_VOID 357VCL_VOID
359vmod_global_clear(VARIABLE_CTX ctx) 358vmod_global_clear(VRT_CTX)
360{ 359{
@@ -366,3 +365,3 @@ vmod_global_clear(VARIABLE_CTX ctx)
366VCL_VOID 365VCL_VOID
367vmod_global_unset(VARIABLE_CTX ctx, VCL_STRING name) 366vmod_global_unset(VRT_CTX, VCL_STRING name)
368{ 367{
@@ -408,3 +407,3 @@ defvar(struct symtab *vt, const char *name, enum variable_type t,
408VCL_VOID 407VCL_VOID
409vmod_clear(VARIABLE_CTX ctx, struct vmod_priv *priv) 408vmod_clear(VRT_CTX, struct vmod_priv *priv)
410{ 409{
@@ -414,3 +413,3 @@ vmod_clear(VARIABLE_CTX ctx, struct vmod_priv *priv)
414VCL_STRING 413VCL_STRING
415vmod_get_string(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name) 414vmod_get_string(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
416{ 415{
@@ -423,3 +422,3 @@ vmod_get_string(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
423VCL_VOID 422VCL_VOID
424vmod_set_string(VARIABLE_CTX ctx, struct vmod_priv *priv, 423vmod_set_string(VRT_CTX, struct vmod_priv *priv,
425 VCL_STRING name, VCL_STRING value) 424 VCL_STRING name, VCL_STRING value)
@@ -434,3 +433,3 @@ vmod_set_string(VARIABLE_CTX ctx, struct vmod_priv *priv,
434VCL_STRING 433VCL_STRING
435vmod_get(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name) 434vmod_get(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
436{ 435{
@@ -440,3 +439,3 @@ vmod_get(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
440VCL_VOID 439VCL_VOID
441vmod_set(VARIABLE_CTX ctx, struct vmod_priv *priv, 440vmod_set(VRT_CTX, struct vmod_priv *priv,
442 VCL_STRING name, VCL_STRING value) 441 VCL_STRING name, VCL_STRING value)
@@ -449,3 +448,3 @@ vmod_set(VARIABLE_CTX ctx, struct vmod_priv *priv,
449 vcl_type \ 448 vcl_type \
450__cat__(vmod_get_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \ 449 __cat__(vmod_get_,r_type)(VRT_CTX, struct vmod_priv *priv, \
451 VCL_STRING name) \ 450 VCL_STRING name) \
@@ -460,3 +459,3 @@ __cat__(vmod_get_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \
460VCL_VOID \ 459VCL_VOID \
461__cat__(vmod_set_,r_type)(VARIABLE_CTX ctx, struct vmod_priv *priv, \ 460 __cat__(vmod_set_,r_type)(VRT_CTX, struct vmod_priv *priv, \
462 VCL_STRING name, \ 461 VCL_STRING name, \
@@ -479,3 +478,3 @@ DEF(duration, VCL_DURATION, d)
479VCL_BOOL 478VCL_BOOL
480vmod_defined(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name) 479vmod_defined(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
481{ 480{
@@ -485,3 +484,3 @@ vmod_defined(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
485VCL_STRING 484VCL_STRING
486vmod_type_of(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name) 485vmod_type_of(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
487{ 486{
@@ -492,3 +491,3 @@ vmod_type_of(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name)
492VCL_VOID 491VCL_VOID
493vmod_unset(VARIABLE_CTX ctx, struct vmod_priv *priv, VCL_STRING name) 492vmod_unset(VRT_CTX, struct vmod_priv *priv, VCL_STRING name)
494{ 493{
@@ -706,3 +705,3 @@ setval(union value *val, const char *s, enum variable_type type, char **err)
706VCL_VOID 705VCL_VOID
707vmod_regset(VARIABLE_CTX ctx, struct vmod_priv *priv, 706vmod_regset(VRT_CTX, struct vmod_priv *priv,
708 VCL_STRING vars, VCL_STRING rxs, VCL_STRING input) 707 VCL_STRING vars, VCL_STRING rxs, VCL_STRING input)
@@ -882,3 +881,3 @@ define_param(struct symtab *vt, struct vardef *def,
882VCL_VOID 881VCL_VOID
883vmod_queryset(VARIABLE_CTX ctx, struct vmod_priv *priv, 882vmod_queryset(VRT_CTX, struct vmod_priv *priv,
884 VCL_STRING vars, VCL_STRING query) 883 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 @@
1# This file is part of vmod-variable 1# This file is part of vmod-variable
2# Copyright (C) 2015, 2016 Sergey Poznyakoff 2# Copyright (C) 2015-2017 Sergey Poznyakoff
3# 3#
@@ -25,13 +25,25 @@ For a detailed documentation, please see vmod-variable(3) manual page.
25$Function VOID set(PRIV_TASK, STRING, STRING) 25$Function VOID set(PRIV_TASK, STRING, STRING)
26
26$Function STRING get(PRIV_TASK, STRING) 27$Function STRING get(PRIV_TASK, STRING)
28
27$Function VOID global_set(STRING, STRING) 29$Function VOID global_set(STRING, STRING)
30
28$Function STRING global_get(STRING) 31$Function STRING global_get(STRING)
32
29$Function VOID set_int(PRIV_TASK, STRING, INT) 33$Function VOID set_int(PRIV_TASK, STRING, INT)
34
30$Function INT get_int(PRIV_TASK, STRING) 35$Function INT get_int(PRIV_TASK, STRING)
36
31$Function VOID set_string(PRIV_TASK, STRING, STRING) 37$Function VOID set_string(PRIV_TASK, STRING, STRING)
38
32$Function STRING get_string(PRIV_TASK, STRING) 39$Function STRING get_string(PRIV_TASK, STRING)
40
33$Function VOID set_real(PRIV_TASK, STRING, REAL) 41$Function VOID set_real(PRIV_TASK, STRING, REAL)
42
34$Function REAL get_real(PRIV_TASK, STRING) 43$Function REAL get_real(PRIV_TASK, STRING)
44
35$Function VOID set_duration(PRIV_TASK, STRING, DURATION) 45$Function VOID set_duration(PRIV_TASK, STRING, DURATION)
46
36$Function DURATION get_duration(PRIV_TASK, STRING) 47$Function DURATION get_duration(PRIV_TASK, STRING)
48
37$Function VOID clear(PRIV_TASK) 49$Function VOID clear(PRIV_TASK)
@@ -39,3 +51,5 @@ $Function VOID clear(PRIV_TASK)
39$Function VOID global_clear() 51$Function VOID global_clear()
52
40$Function BOOL global_defined(STRING) 53$Function BOOL global_defined(STRING)
54
41$Function VOID global_unset(STRING) 55$Function VOID global_unset(STRING)
@@ -43,5 +57,9 @@ $Function VOID global_unset(STRING)
43$Function BOOL defined(PRIV_TASK, STRING) 57$Function BOOL defined(PRIV_TASK, STRING)
58
44$Function STRING type_of(PRIV_TASK, STRING) 59$Function STRING type_of(PRIV_TASK, STRING)
60
45$Function VOID unset(PRIV_TASK, STRING) 61$Function VOID unset(PRIV_TASK, STRING)
62
46$Function VOID regset(PRIV_TASK, STRING, STRING, STRING) 63$Function VOID regset(PRIV_TASK, STRING, STRING, STRING)
64
47$Function VOID queryset(PRIV_TASK, STRING, STRING) 65$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 @@
2# Configurable variable values for vmod-variable test suite. 2# Configurable variable values for vmod-variable test suite.
3# Copyright (C) 2015 Sergey Poznyakoff 3# Copyright (C) 2015, 2017 Sergey Poznyakoff
4 4
5PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH 5PATH=@abs_builddir@:@abs_top_builddir@/src:@abs_top_srcdir@/build-aux:$top_srcdir:$srcdir:$PATH
6VARNISHTEST=@VARNISHTEST@
7VARNISHD=@VARNISHD@
6INITFILE=@abs_builddir@/.TESTINIT 8INITFILE=@abs_builddir@/.TESTINIT
7FAILFILE=@abs_builddir@/FAILURE 9FAILFILE=@abs_builddir@/FAILURE
8VARNISHTEST="@VARNISHSRC@/bin/varnishtest/varnishtest -Dvarnishd=@VARNISHSRC@/bin/varnishd/varnishd"
9VARNISHVERSION=@VARNISHVERSION@
10
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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(clear)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(complex)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(defined)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(duration)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(global string gstring)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(int)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(queryset queryset00)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub vcl_recv {
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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(queryset queryset01)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub vcl_recv {
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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(real)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(regset)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub vcl_recv {
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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(string)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1 # This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod_variable.
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2017 Sergey Poznyakoff
3# 3#
4# Vmod-variable is free software; you can redistribute it and/or modify 4# Vmod_variable is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -8,3 +8,3 @@
8# 8#
9# Vmod-variable is distributed in the hope that it will be useful, 9# Vmod_variable is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -14,35 +14,7 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with vmod-variable. If not, see <http://www.gnu.org/licenses/>. 15# along with vmod_variable. If not, see <http://www.gnu.org/licenses/>.
16
17m4_version_prereq([2.52g])
18
19m4_define([AT_SKIP_TEST],[exit 77])
20
21dnl AT_VARNISHTEST(VCL, CLT[, SRV])
22m4_define([AT_VARNISHTEST],[
23AT_CHECK([
24cat > test.vtc <<EOT
25server s1 {
26m4_if($3,,[dnl
27 rxreq
28 txresp],[$3])
29} -start
30
31varnish v1 -vcl+backend {
32 import std;
33 import variable from "$abs_top_builddir/src/.libs/libvmod_variable.so";
34$1
35} -start
36
37client c1 {
38$2
39} -run
40EOT
41$VARNISHTEST test.vtc | sed 's/^#.*TEST test.vtc passed.*/OK/'
42],
43[0],
44[OK
45])])
46 16
17m4_include([../acvmod/testsuite.inc])
47AT_INIT 18AT_INIT
19# Include your tests here
48m4_include([string.at]) 20m4_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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(type_of)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub 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 @@
1# This file is part of vmod-variable -*- autotest -*- 1# This file is part of vmod-variable -*- autotest -*-
2# Copyright (C) 2015 Sergey Poznyakoff 2# Copyright (C) 2015, 2017 Sergey Poznyakoff
3# 3#
@@ -19,3 +19,3 @@ AT_KEYWORDS(unset)
19 19
20AT_VARNISHTEST([ 20AT_VARNISHTEST([variable],[
21sub vcl_recv { 21sub vcl_recv {

Return to:

Send suggestions and report system problems to the System administrator.