Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
530cb4c0
Commit
530cb4c0
authored
Jan 19, 2017
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Report testfiles without "varnishtest" as skipped.
Have varnishtest test varnishtest (don't look!)
parent
556951d2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
13 deletions
+24
-13
programs.h
bin/varnishtest/programs.h
+1
-0
a00000.vtc
bin/varnishtest/tests/a00000.vtc
+19
-13
a00001.vtc
bin/varnishtest/tests/a00001.vtc
+3
-0
vtc_main.c
bin/varnishtest/vtc_main.c
+1
-0
No files found.
bin/varnishtest/programs.h
View file @
530cb4c0
...
...
@@ -33,5 +33,6 @@ VTC_PROG(varnishhist)
VTC_PROG
(
varnishlog
)
VTC_PROG
(
varnishncsa
)
VTC_PROG
(
varnishstat
)
VTC_PROG
(
varnishtest
)
VTC_PROG
(
varnishtop
)
#undef VTC_PROG
bin/varnishtest/tests/a00000.vtc
View file @
530cb4c0
# the first token in a varnishtest file must be "varnishtest",
# but whitespace (SP)
# and (TAB) and comments are fine
varnishtest "Test varnishtest itself"
varnishtest "basic default HTTP transactions"
shell -exit 1 -expect {usage: varnishtest} {varnishtest -h}
server s1 {
rxreq
txresp
shell {
pwd
echo 'notvarnishtest foo bar' > _.vtc
echo 'shell "exit 9"' >> _.vtc
}
server s1 -start
shell -exit 2 -expect {doesn't start with 'varnishtest'} {
varnishtest -v _.vtc
}
client c1 -connect ${s1_sock
} {
txreq
rxresp
shell -exit 77 -expect {0 tests failed, 1 tests skipped, 0 tests passed
} {
unset TMPDIR
varnishtest -k _.vtc
}
client c1 -run
# Test external macro-def with a a two-turtle test
shell -expect {__=barf} {
echo varnishtest foo > _.vtc
printf 'shell {echo %c{foobar} > ${tmpdir}/__}' '$' >> _.vtc
varnishtest -q -Dfoobar=barf _.vtc
echo __=`cat __`
}
server s1 -wait
bin/varnishtest/tests/a00001.vtc
View file @
530cb4c0
# the first token in a varnishtest file must be "varnishtest",
# but whitespace (SP)
# and (TAB) and comments are fine
varnishtest "basic default HTTP transactions with expect"
server s1 {
...
...
bin/varnishtest/vtc_main.c
View file @
530cb4c0
...
...
@@ -544,6 +544,7 @@ read_file(const char *fn, int ntest)
fprintf
(
stderr
,
"File
\"
%s
\"
doesn't start with 'varnishtest'
\n
"
,
fn
);
free
(
p
);
vtc_skip
++
;
return
(
2
);
}
ALLOC_OBJ
(
tp
,
TST_MAGIC
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment