← Commit list

1a712e5c60

Daniel Stenberg
Daniel Stenberg
2026-09-22
SUCCESS Duration: 396s

Subject

tests: for libtests, assume a default name

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

docs/tests/FILEFORMAT.md+7 -0
@@ -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.
tests/runner.pm+6 -1
@@ -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');