Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions spin/cmds/meson.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,16 @@ def _get_configured_command(command_name):
default="html",
help=f"Format of the gcov report. Can be one of {', '.join(e.value for e in GcovReportFormat)}.",
)
@click.option(
"--lldb",
is_flag=True,
help="Run pytest via lldb.",
)
@click.option(
"--gdb",
is_flag=True,
help="Run pytest via gdb.",
)
@build_option
@build_dir_option
@click.pass_context
Expand All @@ -496,6 +506,8 @@ def test(
coverage=False,
gcov=None,
gcov_format=None,
lldb=False,
gdb=False,
build=None,
build_dir=None,
):
Expand Down Expand Up @@ -632,6 +644,17 @@ def test(
else:
cmd = ["pytest"]

if lldb:
cmd = [
"lldb",
"-O",
"settings set target.process.follow-fork-mode child",
"--",
] + cmd

if gdb:
cmd = ["gdb", "-ex", "set detach-on-fork on", "--args"] + cmd

install_dir = _get_install_dir(build_dir)
if not os.path.exists(install_dir):
os.mkdir(install_dir)
Expand Down