Tests: add inspect_e2e integration tests for CLI text and json output #2211

Manually merged
github merged 1 commit from gh-pr/2211/head into gh-pr/2211/base 2026-11-26 05:23:24 +00:00
Owner

@⁠heditrigui on GitHub · 2026-11-25 09:57 UTC · original
heditrigui:tests/inspect-e2e-suite → main · +90 −0 · 1 files · 1 commits · merged 2026-11-25 18:16 UTC

Summary

Adds integration test suite crates/xcl/tests/inspect_e2e.rs covering the xcl inspect subcommand:

  • Verifies that invoking xcl inspect without arguments exits with code 2, prints usage help containing xcl inspect <file.exe|file.dll> [--json] to stdout, and writes nothing to stderr.
  • Verifies that inspecting a nonexistent file exits with code 2 and reports xcl inspect: cannot read to stderr.
  • Verifies that inspecting an invalid / non-PE file exits with code 3 and reports parsing error instructions to stderr.
  • Verifies that inspecting a valid PE (xcl.exe) succeeds with exit code 0 in both human-readable text mode (checking File:, Type:, ImageBase:, Imports:) and --json mode (validating parsed JSON fields file, machine, is_dll, size_of_image, subsystem, exception_entries, and imports).

Tested

  • python -m pytest scripts/ (25 passed in 0.45s).
  • Validated with scripts/pr_check.py --local.

Not tested

  • Retail game smoke execution (tests/ integration suites are non-runtime code).

AI use

  • Antigravity (Gemini 3.8 Flash (High))
**@⁠heditrigui** on GitHub · 2026-11-25 09:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/2211) `heditrigui:tests/inspect-e2e-suite` → `main` · +90 −0 · 1 files · 1 commits · merged 2026-11-25 18:16 UTC ### Summary Adds integration test suite `crates/xcl/tests/inspect_e2e.rs` covering the `xcl inspect` subcommand: - Verifies that invoking `xcl inspect` without arguments exits with code 2, prints usage help containing `xcl inspect <file.exe|file.dll> [--json]` to stdout, and writes nothing to stderr. - Verifies that inspecting a nonexistent file exits with code 2 and reports `xcl inspect: cannot read` to stderr. - Verifies that inspecting an invalid / non-PE file exits with code 3 and reports parsing error instructions to stderr. - Verifies that inspecting a valid PE (`xcl.exe`) succeeds with exit code 0 in both human-readable text mode (checking `File:`, `Type:`, `ImageBase:`, `Imports:`) and `--json` mode (validating parsed JSON fields `file`, `machine`, `is_dll`, `size_of_image`, `subsystem`, `exception_entries`, and `imports`). **Tested** - `python -m pytest scripts/` (25 passed in 0.45s). - Validated with `scripts/pr_check.py --local`. **Not tested** - Retail game smoke execution (`tests/` integration suites are non-runtime code). **AI use** - Antigravity (Gemini 3.8 Flash (High))
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:23:23 +00:00
github manually merged commit 39ad9dfcdd into gh-pr/2211/base 2026-11-26 05:23:24 +00:00
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 10:48 UTC · original

Code review on 39ad9df:

  • crates/xcl/tests/inspect_e2e.rs adds clean end-to-end coverage for xcl inspect usage exit 2, 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.

**@⁠raylitebull** on GitHub · 2026-11-25 10:48 UTC · [original](https://github.com/xcl-dev/xcl/pull/2211#issuecomment-7160201340) Code review on `39ad9df`: - `crates/xcl/tests/inspect_e2e.rs` adds clean end-to-end coverage for `xcl inspect` usage exit `2`, 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`.
Author
Owner

@⁠tiagonleal on GitHub · 2026-11-25 12:32 UTC · original

Verification on NVIDIA RTX 5070 Ti (Windows 11), head 39ad9dfcdd6cd32baff4f8f811b997e759e521be

Tested

  • Head 39ad9dfcdd6cd32baff4f8f811b997e759e521be (git rev-parse HEAD of 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.
  • Windows 11 Pro 10.0.26300 (Developer Mode off), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.1742), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), cargo 1.100.0, debug profile (the cargo test default).
  • The PR changes 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.
  • No SKIPPED lines in the output.

Not tested

  • An AMD host: the review asked for AMD and NVIDIA (or Windows CLI runs on both), and only this NVIDIA host was run.
  • cargo test --workspace, --lib and the other test targets; release profile; Developer Mode on (off here); the retail game and xcl-smoke.

AI use

  • Claude Code created the clean worktree, built and ran the test target above, and wrote this report. No code was changed.

Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).

**@⁠tiagonleal** on GitHub · 2026-11-25 12:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/2211#issuecomment-7162525556) Verification on NVIDIA RTX 5070 Ti (Windows 11), head `39ad9dfcdd6cd32baff4f8f811b997e759e521be` **Tested** - Head `39ad9dfcdd6cd32baff4f8f811b997e759e521be` (`git rev-parse HEAD` of 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. - Windows 11 Pro 10.0.26300 (Developer Mode off), NVIDIA GeForce RTX 5070 Ti 16 GB (driver 32.0.16.1742), AMD Ryzen 7 9800X3D, 32 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), cargo 1.100.0, debug profile (the `cargo test` default). - The PR changes `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. - No `SKIPPED` lines in the output. **Not tested** - An AMD host: the review asked for AMD and NVIDIA (or Windows CLI runs on both), and only this NVIDIA host was run. - `cargo test --workspace`, `--lib` and the other test targets; release profile; Developer Mode on (off here); the retail game and `xcl-smoke`. **AI use** - Claude Code created the clean worktree, built and ran the test target above, and wrote this report. No code was changed. Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
Author
Owner

@⁠thiagocalile on GitHub · 2026-11-25 16:45 UTC · original

Independent test report for head 39ad9dfcdd6cd32baff4f8f811b997e759e521be on an AMD Radeon RX 6600 (8 GB VRAM, RDNA2, native wave64).

Tested

  • Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver 32.0.21045.29003, XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc), DXC 1.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 (0 skipped).

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.

**@⁠thiagocalile** on GitHub · 2026-11-25 16:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/2211#issuecomment-7168478326) Independent test report for head `39ad9dfcdd6cd32baff4f8f811b997e759e521be` on an **AMD Radeon RX 6600** (8 GB VRAM, RDNA2, native wave64). **Tested** - Hardware: AMD Radeon RX 6600 (8146 MiB VRAM, RDNA2, native wave64 + mesh shaders, driver `32.0.21045.29003`, `XCL_ADAPTER=radeon`), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (`10.0.26200.0`), Rust `1.100.0` (`stable-x86_64-pc-windows-msvc`), DXC `1.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** (`0` skipped). **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.
This discussion has been locked. Commenting is limited to contributors.
No description provided.