Commit c0833695 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add a new "feature" command, and skip the test if we don't have

the features listed on the present platform



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@4568 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 104b9ced
......@@ -2,6 +2,8 @@
test "Check the between_bytes_timeout behaves from parameters"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
......
......@@ -2,6 +2,8 @@
test "Check the between_bytes_timeout behaves from vcl"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
......
......@@ -2,6 +2,8 @@
test "Check the between_bytes_timeout behaves from backend definition"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
send "HTTP/1.1 200 Ok\r\nConnection: close\r\n\r\n"
......
......@@ -2,6 +2,8 @@
test "Check that the first_byte_timeout works from parameters"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
delay 1.5
......
......@@ -2,6 +2,8 @@
test "Check that the first_byte_timeout works from vcl"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
delay 1.5
......
......@@ -2,6 +2,8 @@
test "Check that the first_byte_timeout works from backend definition"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
delay 1.5
......
......@@ -2,6 +2,8 @@
test "Check the precedence for timeouts"
feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
expect req.url == "from_backend"
......
......@@ -448,6 +448,31 @@ cmd_random(CMD_ARGS)
}
}
/**********************************************************************
* Check features.
*/
static void
cmd_feature(CMD_ARGS)
{
int i;
(void)priv;
(void)cmd;
if (av == NULL)
return;
for (i = 1; av[i] != NULL; i++) {
#ifdef SO_RCVTIMEO_WORKS
if (!strcmp(av[i], "SO_RCVTIMEO_WORKS"))
continue;
#endif
vtc_log(vl, 1, "SKIPPING test, missing feature %s", av[i]);
vtc_stop = 1;
return;
}
}
/**********************************************************************
* Execute a file
*/
......@@ -461,6 +486,7 @@ static const struct cmds cmds[] = {
{ "shell", cmd_shell },
{ "sema", cmd_sema },
{ "random", cmd_random },
{ "feature", cmd_feature },
{ NULL, NULL }
};
......
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