aboutsummaryrefslogtreecommitdiff
path: root/testsuite.inc
blob: 52795a888b09920ae2bdb2ffa61b5d78f9a3996a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
m4_version_prereq([2.52g])

m4_define([AT_SKIP_TEST],[exit 77])

dnl AT_VARNISHTEST(MODULE, VCL, CLT[, SRV])
m4_define([AT_VARNISHTEST],[
AT_CHECK([
cat > test.vtc <<EOT
server s1 {
m4_if($4,,[dnl
        rxreq
        txresp],[$4])
} -start

varnish v1 -vcl+backend {
	import std;
        import $1 from "$abs_top_builddir/src/.libs/libvmod_$1.so";
$2
} -start

client c1 {
$3
} -run
EOT
$VARNISHTEST \
 -Dvarnishd="$VARNISHD"\
 -Dvmod_topsrc=$abs_top_srcdir\
 -Dvmod_topbuild=$abs_top_builddir test.vtc | sed 's/^#.*TEST test.vtc passed.*/OK/'
],
[0],
[OK
])])

# End of testsuite.inc

Return to:

Send suggestions and report system problems to the System administrator.