Commit 530cb4c0 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Report testfiles without "varnishtest" as skipped.

Have varnishtest test varnishtest (don't look!)
parent 556951d2
......@@ -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
# 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
# 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 {
......
......@@ -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);
......
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