"CLI-Anything: Making ALL Software Agent-Native" -- CLI-Hub: https://clianything.cc/
Python
test: remove lldb core e2e skip
aimidi204a99303815
diff --git a/lldb/agent-harness/cli_anything/lldb/README.md b/lldb/agent-harness/cli_anything/lldb/README.mdindex 54d814dde..b3463e7ff 100644--- a/lldb/agent-harness/cli_anything/lldb/README.md+++ b/lldb/agent-harness/cli_anything/lldb/README.md@@ -97,4 +97,4 @@ pytest cli_anything/lldb/tests/test_full_e2e.py -vE2E tests require:- a working C compiler (`clang`, `gcc`, or `cc`) so the tests can build a small debug helper-- optional `LLDB_TEST_CORE` for core-load scenario+- no extra env vars for the default suite; `LLDB_TEST_CORE` is optional if you want to point the negative-path core-load check at a specific local filediff --git a/lldb/agent-harness/cli_anything/lldb/tests/TEST.md b/lldb/agent-harness/cli_anything/lldb/tests/TEST.mdindex c4772aa70..4d10782ea 100644--- a/lldb/agent-harness/cli_anything/lldb/tests/TEST.md+++ b/lldb/agent-harness/cli_anything/lldb/tests/TEST.md@@ -41,13 +41,13 @@### Prerequisites- LLDB installed and available in PATH- A C compiler (`clang`, `gcc`, or `cc`) so the tests can build a small debug helper-- optional `LLDB_TEST_CORE` for the core-load negative-path check+- optional `LLDB_TEST_CORE` to override the placeholder file used for the core-load negative-path check### Workflows to validate- Create target in one command, read target info in a later command via the same persisted session- Set breakpoint -> launch -> inspect threads/backtrace/locals -> evaluate expression -> read/find memory -> step -> continue- Attach to a live process, then close the LLDB session without killing the attached process-- Load core dump negative path (optional; controlled by `LLDB_TEST_CORE`)+- Load core dump negative path without a target selected, using either a provided `LLDB_TEST_CORE` path or an auto-generated placeholder file### Output validation- All command responses parse as valid JSON in `--json` mode@@ -97,13 +97,13 @@ python -m pytest cli_anything/lldb/tests -q### Result summary- `test_core.py`: 18 passed-- `test_full_e2e.py`: 3 passed, 1 skipped-- combined: 21 passed, 1 skipped-- Skip reason: `LLDB_TEST_CORE` was not provided, so the optional core-dump scenario was not exercised+- `test_full_e2e.py`: 4 passed+- combined: 22 passed### Notes- Verified the installed `cli-anything-lldb` entrypoint on Windows after editable install+- The core-load negative-path test now auto-generates a placeholder file, so no extra env var is required for the default E2E suite- Fixed REPL fallback behavior for non-interactive subprocess execution on Windows- Fixed Windows REPL command parsing so quoted paths and inherited `--json` mode work correctly- Added a persistent background LLDB session so non-REPL commands can share debugger statediff --git a/lldb/agent-harness/cli_anything/lldb/tests/test_full_e2e.py b/lldb/agent-harness/cli_anything/lldb/tests/test_full_e2e.pyindex aa72e5dcd..5f544d157 100644--- a/lldb/agent-harness/cli_anything/lldb/tests/test_full_e2e.py+++ b/lldb/agent-harness/cli_anything/lldb/tests/test_full_e2e.py@@ -18,8 +18,7 @@ from pathlib import Pathimport pytestHARNESS_ROOT = str(Path(__file__).resolve().parents[3])-TEST_CORE = os.environ.get("LLDB_TEST_CORE", "")-HAS_CORE = os.path.isfile(TEST_CORE) if TEST_CORE else False+TEST_CORE = os.environ.get("LLDB_TEST_CORE", "").strip()HELPER_SOURCE = r"""#include <stdio.h>@@ -67,7 +66,6 @@ except Exception:HAS_LLDB_MODULE = Falseskip_no_lldb = pytest.mark.skipif(not HAS_LLDB_MODULE, reason="lldb module not importable")-skip_no_core = pytest.mark.skipif(not HAS_CORE, reason="LLDB_TEST_CORE not set or file missing")def _find_compiler() -> str | None:@@ -104,6 +102,16 @@ def session_file(tmp_path) -> Path:return tmp_path / "lldb-session.json"+def core_file(tmp_path) -> str:+ if TEST_CORE and os.path.isfile(TEST_CORE):+ return TEST_CORE++ placeholder = tmp_path / "placeholder.core"+ placeholder.write_bytes(b"lldb-core-placeholder")+ return str(placeholder)++def _run_cli(*args, session_file: Path, input_text: str | None = None, timeout: int = 90) -> dict:cmd = [sys.executable,@@ -226,9 +234,8 @@ class TestLLDBE2E:@skip_no_lldb-@skip_no_coreclass TestCoreE2E:- def test_core_load_requires_target(self, session_file: Path):+ def test_core_load_requires_target(self, session_file: Path, core_file: str):cmd = [sys.executable,"-m",@@ -239,7 +246,7 @@ class TestCoreE2E:"core","load","--path",- TEST_CORE,+ core_file,]result = subprocess.run(cmd, capture_output=True, text=True, cwd=HARNESS_ROOT)assert result.returncode == 1