]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: fix bundled test invocation with `-g` option
authorViktor Szakats <commit@vsz.me>
Tue, 1 Apr 2025 09:02:57 +0000 (11:02 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 1 Apr 2025 09:46:17 +0000 (11:46 +0200)
Fixes:
```
$ ./runtests.pl -g 1940
./libtest/libtests lib1940: No such file or directory.
Argument list to give program being debugged when it is started is "http://127.0.0.1:44547/1940".
```

Reported-by: Daniel Stenberg
Fixes #16893
Closes #16898

tests/runner.pm

index 14acbcdd92cbdefc39107706921c8edce95d09ce..d003a334e3169856680c1b889ca58dc4a41962b3 100644 (file)
@@ -939,7 +939,12 @@ sub singletest_run {
         $CMDLINE=exerunner() . $CMDLINE;
 
         if($bundle) {
-            $CMDLINE.=" $tool_name";
+            if($gdbthis) {
+                $cmdargs =" $tool_name$cmdargs";
+            }
+            else {
+                $CMDLINE.=" $tool_name";
+            }
         }
 
         $DBGCURL=$CMDLINE;