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
64dc214d
Commit
64dc214d
authored
Sep 24, 2018
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make "vtest" an alias for "varnishtest" in the first line.
parent
a852a43f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
6 deletions
+31
-6
cmds.h
bin/varnishtest/cmds.h
+1
-0
a00000.vtc
bin/varnishtest/tests/a00000.vtc
+1
-1
a00001.vtc
bin/varnishtest/tests/a00001.vtc
+1
-1
vtc_main.c
bin/varnishtest/vtc_main.c
+4
-2
vtc_misc.c
bin/varnishtest/vtc_misc.c
+24
-2
No files found.
bin/varnishtest/cmds.h
View file @
64dc214d
...
...
@@ -43,6 +43,7 @@ CMD(shell)
CMD
(
syslog
)
CMD
(
varnish
)
CMD
(
varnishtest
)
CMD
(
vtest
)
#undef CMD
/*lint -restore */
bin/varnishtest/tests/a00000.vtc
View file @
64dc214d
...
...
@@ -10,7 +10,7 @@ shell {
echo 'shell "exit 9"' >> _.vtc
}
shell -exit 2 -expect {doesn't start with 'varnishtest'} {
shell -exit 2 -expect {doesn't start with 'v
test' or 'v
arnishtest'} {
varnishtest -v _.vtc
}
...
...
bin/varnishtest/tests/a00001.vtc
View file @
64dc214d
v
arnish
test "Test Teken terminal emulator"
vtest "Test Teken terminal emulator"
feature cmd "vttest --version 2>&1 | grep -q Usage"
...
...
bin/varnishtest/vtc_main.c
View file @
64dc214d
...
...
@@ -547,9 +547,11 @@ read_file(const char *fn, int ntest)
return
(
2
);
}
if
(
strncmp
(
q
,
"varnishtest"
,
11
)
||
!
isspace
(
q
[
11
]))
{
if
((
strncmp
(
q
,
"varnishtest"
,
11
)
||
!
isspace
(
q
[
11
]))
&&
(
strncmp
(
q
,
"vtest"
,
5
)
||
!
isspace
(
q
[
5
])))
{
fprintf
(
stderr
,
"File
\"
%s
\"
doesn't start with 'varnishtest'
\n
"
,
fn
);
"File
\"
%s
\"
doesn't start with"
" 'vtest' or 'varnishtest'
\n
"
,
fn
);
free
(
p
);
vtc_skip
++
;
return
(
2
);
...
...
bin/varnishtest/vtc_misc.c
View file @
64dc214d
...
...
@@ -49,17 +49,39 @@
#include "vre.h"
#include "vtim.h"
/* SECTION: v
arnishtest varnish
test
/* SECTION: v
test v
test
*
* This should be the first command in your vtc as it will identify the test
* case with a short yet descriptive sentence. It takes exactly one argument, a
* string, eg::
*
* v
arnishtest "Check that varnish
test is actually a valid command"
* v
test "Check that v
test is actually a valid command"
*
* It will also print that string in the log.
*/
void
v_matchproto_
(
cmd_f
)
cmd_vtest
(
CMD_ARGS
)
{
(
void
)
priv
;
(
void
)
cmd
;
(
void
)
vl
;
if
(
av
==
NULL
)
return
;
AZ
(
strcmp
(
av
[
0
],
"vtest"
));
vtc_log
(
vl
,
1
,
"TEST %s"
,
av
[
1
]);
AZ
(
av
[
2
]);
}
/* SECTION: varnishtest varnishtest
*
* Alternate name for 'vtest', see above.
*
*/
void
v_matchproto_
(
cmd_f
)
cmd_varnishtest
(
CMD_ARGS
)
{
...
...
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