Skip to content

Commit 423dcd3

Browse files
authored
Test lldb on macOS (#200)
1 parent 8c5d38a commit 423dcd3

2 files changed

Lines changed: 19 additions & 1 deletion

File tree

spin/tests/test_build_cmds.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from pathlib import Path
66

77
import pytest
8-
from testutil import skip_on_windows, skip_unless_linux, spin, stdout
8+
from testutil import skip_on_windows, skip_unless_linux, skip_unless_macos, spin, stdout
99

1010
from spin.cmds.util import run
1111

@@ -143,3 +143,17 @@ def test_gdb():
143143
"--batch",
144144
)
145145
assert "hi" in stdout(p)
146+
147+
148+
@skip_unless_macos
149+
def test_lldb():
150+
p = spin(
151+
"lldb",
152+
"-c",
153+
'import example_pkg; example_pkg.echo("hi")',
154+
"--",
155+
"-o",
156+
"run",
157+
"--batch",
158+
)
159+
assert "hi" in stdout(p)

spin/tests/testutil.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
not sys.platform.startswith("linux"), reason="Skipped; platform not Linux"
1414
)
1515

16+
skip_unless_macos = pytest.mark.skipif(
17+
not sys.platform.startswith("darwin"), reason="Skipped; platform not macOS"
18+
)
19+
1620

1721
def spin(*args, **user_kwargs):
1822
args = (str(el) for el in args)

0 commit comments

Comments
 (0)