It is also possible to specify tests based on a keyword describing the test(s)
to run, like `FTPS`. The keywords are strings used in the individual tests.
+Features are included as keywords with the `feat:` prefix (e.g., `feat:debug`).
+Specify a feature to run only tests requiring it, or exclude tests using
+`!feat:<feature>`, like `!feat:proxy`, to disable tests which depend on that
+feature.
+
You can also specify keywords with a leading exclamation point and the keyword
or phrase, like "!HTTP NTLM auth" to run all tests **except** those using this
keyword. Remember that the exclamation marks and spaces need to be quoted
if(!$info_keywords[0]) {
$why = "missing the <keywords> section!";
}
+ # Only evaluate keywords if the section is present.
+ else {
+ # Prefix features with "feat:" and add to keywords list.
+ push @info_keywords, map { "feat:" . lc($_) } getpart("client", "features");
- my $match;
- for my $k (@info_keywords) {
- chomp $k;
- if ($disabled_keywords{lc($k)}) {
- $why = "disabled by keyword";
- }
- elsif ($enabled_keywords{lc($k)}) {
- $match = 1;
- }
- if ($ignored_keywords{lc($k)}) {
- logmsg "Warning: test$testnum result is ignored due to $k\n";
- $errorreturncode = 2;
+ my $match;
+ for my $k (@info_keywords) {
+ chomp $k;
+ if ($disabled_keywords{lc($k)}) {
+ if ($k =~ /^feat:/) {
+ $why = "disabled by feature";
+ }
+ else {
+ $why = "disabled by keyword";
+ }
+ }
+ elsif ($enabled_keywords{lc($k)}) {
+ $match = 1;
+ }
+ if ($ignored_keywords{lc($k)}) {
+ logmsg "Warning: test$testnum result is ignored due to $k\n";
+ $errorreturncode = 2;
+ }
}
- }
- if(!$why && !$match && %enabled_keywords) {
- $why = "disabled by missing keyword";
+ if(!$why && !$match && %enabled_keywords) {
+ if (grep { /^feat:/ } keys %enabled_keywords) {
+ $why = "disabled by missing feature";
+ }
+ else {
+ $why = "disabled by missing keyword";
+ }
+ }
}
}