aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.pm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.pm')
-rw-r--r--tests/runner.pm24
1 files changed, 19 insertions, 5 deletions
diff --git a/tests/runner.pm b/tests/runner.pm
index 8b61eb4b3..c0fb40cb3 100644
--- a/tests/runner.pm
+++ b/tests/runner.pm
@@ -115,7 +115,7 @@ our $DBGCURL=$CURL; #"../src/.libs/curl"; # alternative for debugging
our $valgrind_logfile="--log-file"; # the option name for valgrind >=3
our $valgrind_tool="--tool=memcheck";
our $gdb = checktestcmd("gdb");
-our $gdbthis; # run test case with gdb debugger
+our $gdbthis = 0; # run test case with debugger (gdb or lldb)
our $gdbxwin; # use windowed gdb when using gdb
# torture test variables
@@ -945,9 +945,16 @@ sub singletest_run {
if($gdbthis) {
my $gdbinit = "$TESTDIR/gdbinit$testnum";
open(my $gdbcmd, ">", "$LOGDIR/gdbcmd") || die "Failure writing gdb file";
- print $gdbcmd "set args $cmdargs\n";
- print $gdbcmd "show args\n";
- print $gdbcmd "source $gdbinit\n" if -e $gdbinit;
+ if($gdbthis == 1) {
+ # gdb mode
+ print $gdbcmd "set args $cmdargs\n";
+ print $gdbcmd "show args\n";
+ print $gdbcmd "source $gdbinit\n" if -e $gdbinit;
+ }
+ else {
+ # lldb mode
+ print $gdbcmd "set args $cmdargs\n";
+ }
close($gdbcmd) || die "Failure writing gdb file";
}
@@ -963,11 +970,18 @@ sub singletest_run {
$testnum,
"$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " -x $LOGDIR/gdbcmd");
}
- elsif($gdbthis) {
+ elsif($gdbthis == 1) {
+ # gdb
my $GDBW = ($gdbxwin) ? "-w" : "";
runclient("$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " $GDBW -x $LOGDIR/gdbcmd");
$cmdres=0; # makes it always continue after a debugged run
}
+ elsif($gdbthis == 2) {
+ # $gdb is "lldb"
+ print "runs lldb -- $CURL $cmdargs\n";
+ runclient("lldb -- $CURL $cmdargs");
+ $cmdres=0; # makes it always continue after a debugged run
+ }
else {
# Convert the raw result code into a more useful one
($cmdres, $dumped_core) = normalize_cmdres(runclient("$CMDLINE"));