Tests: add inspect_e2e integration tests for CLI text and json output #2201
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2211"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T09:57:37Z.
Summary
Adds integration test suite
crates/xcl/tests/inspect_e2e.rscovering thexcl inspectsubcommand:xcl inspectwithout arguments exits with code 2, prints usage help containingxcl inspect <file.exe|file.dll> [--json]to stdout, and writes nothing to stderr.xcl inspect: cannot readto stderr.xcl.exe) succeeds with exit code 0 in both human-readable text mode (checkingFile:,Type:,ImageBase:,Imports:) and--jsonmode (validating parsed JSON fieldsfile,machine,is_dll,size_of_image,subsystem,exception_entries, andimports).Tested
python -m pytest scripts/(25 passed in 0.45s).scripts/pr_check.py --local.Not tested
tests/integration suites are non-runtime code).AI use
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:48:33Z.
Code review on
39ad9df:crates/xcl/tests/inspect_e2e.rsadds clean end-to-end coverage forxcl inspectusage exit2, missing/non-PE error paths, and PE text + JSON field output, and both CI checks (Build and test+PR description) are green.Remaining before merge: Independent verification across AMD and NVIDIA hosts (or Windows CLI runs on both) on
39ad9df.Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-25T12:32:59Z.
Verification on NVIDIA RTX 5070 Ti (Windows 11), head
39ad9dfcdd6cd32baff4f8f811b997e759e521beTested
39ad9dfcdd6cd32baff4f8f811b997e759e521be(git rev-parse HEADof a clean worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this.cargo testdefault).crates/xcl/tests/inspect_e2e.rs, so I ran that target and not--lib:cargo test -p xcl --test inspect_e2e -- --test-threads=4 --nocapture: 4 passed, 0 failed, 0 ignored (about 20 s including an incremental build). Tests:inspect_missing_arguments_prints_help_and_exits_two,inspect_nonexistent_file_exits_two_with_error,inspect_non_pe_file_exits_three_with_parse_error,inspect_valid_pe_in_text_and_json_modes. This is the Windows CLI run on an NVIDIA host that the review asked for.SKIPPEDlines in the output.Not tested
cargo test --workspace,--liband the other test targets; release profile; Developer Mode on (off here); the retail game andxcl-smoke.AI use
Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
Imported from ivall/xcl. Originally posted by thiagocalile on 2026-11-25T16:45:13Z.
Independent test report for head
39ad9dfcdd6cd32baff4f8f811b997e759e521beon an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).Tested
32.0.21045.29003,XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test --no-fail-fast -p xcl --test inspect_e2e -- --test-threads=4: 4 passed, 0 failed, 0 ignored (0skipped).Not tested: full workspace test suite on this head, NVIDIA/Intel GPUs, or Linux/Wine (test-only PR, no smoke run needed).
AI use: Antigravity (Gemini 4 Neon) ran the builds, tests, and smoke runs and drafted this report; the account owner reviewed and approved posting.