runtests: auto-detect test bundle builds

If libtests, units and servers binaries are all present, auto-enable
bundle mode.

Drop manual runtests option.

Note: Make sure to "make clean" before changing the test bundle build
setting.

Also fix to append executable extension to all libtest and unit test
executables when launching them. This should make it a tiny bit faster
on Windows.

Follow-up to f4f25505df #15000
Follow-up to 71cf0d1fca #14772

Closes #16750
This commit is contained in:
Viktor Szakats 2025-03-17 18:46:42 +01:00
parent 77861ace49
commit a9b7cbf34f
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
5 changed files with 15 additions and 26 deletions

View file

@ -916,24 +916,20 @@ sub singletest_run {
# Default the tool to a unit test with the same name as the test spec
if($keywords{"unittest"} && !$tool) {
$tool_name="unit$testnum";
$tool = $tool_name;
$tool = $tool_name . exe_ext('TOOL');
}
if($tool =~ /^lib/) {
if($bundle) {
$CMDLINE=$LIBDIR . "libtests";
}
else {
$CMDLINE=$LIBDIR . $tool;
$tool = "libtests" . exe_ext('TOOL');
}
$CMDLINE=$LIBDIR . $tool;
}
elsif($tool =~ /^unit/) {
if($bundle) {
$CMDLINE=$UNITDIR . "units";
}
else {
$CMDLINE=$UNITDIR . $tool;
$tool = "units" . exe_ext('TOOL')
}
$CMDLINE=$UNITDIR . $tool;
}
if(! -f $CMDLINE) {