tests: for libtests, assume a default name
No binary (build failed)
—
(log yok)
| @@ -567,10 +567,17 @@ is skipped and the (single-line) output is displayed as reason for not running | |
| the test. | |
| ### `<tool>` | |
| + | |
| Name of tool to invoke instead of "curl". This tool must be built and exist | |
| either in the `libtest/` directory (if the tool name starts with `lib`) or in | |
| the `unit/` directory (if the tool name starts with `unit`). | |
| + | If the keyword `unittest` is set in the test case, the default name for the |
| + | tool is `unit%TESTNUMBER`. |
| + | |
| + | If the keyword `libtest` is set in the test case, the default name for the |
| + | tool is `lib%TESTNUMBER`. |
| + | |
| ### `<name>` | |
| Brief test case description, shown when the test runs. | |
| @@ -862,7 +862,7 @@ sub singletest_run { | |
| $tool = $CMDLINE; | |
| $disablevalgrind = 1; | |
| } | |
| - | elsif(!$tool && !$keywords{"unittest"}) { |
| + | elsif(!$tool && (!$keywords{"unittest"} && !$keywords{"libtest"})) { |
| # run curl, add suitable command line options | |
| my $inc = ""; | |
| if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-include/)) { | |
| @@ -907,6 +907,11 @@ sub singletest_run { | |
| $tool_name = "unit$testnum"; | |
| $tool = $tool_name . exe_ext('TOOL'); | |
| } | |
| + | # Default the tool to a libtest with the same number as the test |
| + | elsif($keywords{"libtest"} && !$tool) { |
| + | $tool_name = "lib$testnum"; |
| + | $tool = $tool_name . exe_ext('TOOL'); |
| + | } |
| if($tool =~ /^lib/) { | |
| $tool = "libtests" . exe_ext('TOOL'); | |