Skip to content

Commit df6743f

Browse files
committed
Skip POSIX-only kernel control tests on non-Linux runners
1 parent 2a1b2ac commit df6743f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

tests/test_harbor_kernel_control.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,11 @@ def test_kernel_setup_and_test_scripts_wire_lifecycle(
130130
assert (env_dir / "harbor" / "browser_runtime_providers.py").is_file()
131131

132132

133+
@pytest.mark.skipif(
134+
sys.platform != "linux",
135+
reason="wrap-harbor-agent.sh runs inside Harbor's Linux containers; "
136+
"bash signal handling differs on mac and windows runners",
137+
)
133138
def test_stop_wrapper_interrupts_agent_and_exits_cleanly(tmp_path: Path) -> None:
134139
bin_dir = tmp_path / "bin"
135140
bin_dir.mkdir()
@@ -364,8 +369,9 @@ def test_start_writes_state_and_credential_free_metadata(
364369
state = json.loads(module.STATE_FILE.read_text())
365370
assert state["status"] == "created"
366371
assert state["cdp_url"].startswith("wss://kernel.example")
367-
assert oct(module.STATE_FILE.stat().st_mode & 0o777) == "0o600"
368-
assert oct(module.CDP_URL_FILE.stat().st_mode & 0o777) == "0o600"
372+
if sys.platform != "win32":
373+
assert oct(module.STATE_FILE.stat().st_mode & 0o777) == "0o600"
374+
assert oct(module.CDP_URL_FILE.stat().st_mode & 0o777) == "0o600"
369375

370376
metadata = json.loads(module.METADATA_FILE.read_text())
371377
assert metadata["session_id"] == "sess-123"

0 commit comments

Comments
 (0)