Skip to content

build: run the HTTP server's unit tests on Linux hosts too (test-server-cpu) - #543

Closed
MiaAI-Lab wants to merge 1 commit into
ashhart:mainfrom
MiaAI-Lab:pr/linux-server-tests
Closed

MiaAI-Lab wants to merge 1 commit into
ashhart:mainfrom
MiaAI-Lab:pr/linux-server-tests

Conversation

@MiaAI-Lab

Copy link
Copy Markdown
Contributor

zig/src/server/root.zig's unit tests (routes, templates, tool parsing) run only in the macOS build, from nativeServer. On Linux, zig build test skips them.

This change makes cuda_build.hostTests build them against the CUDA build's engine_api, with the same tokenizer and template modules. zig build test on Linux now runs them, and zig build test-server-cpu runs them alone. The diff is one file, zig/build/cuda.zig.

Tested on a DGX Spark (GB10, aarch64 Linux, Zig 0.17.0):

  • zig build test-server-cpu: 3/3 steps, 61/61 tests passed.
  • zig build test: one unrelated failure, direct_io.test.direct reads return the same bytes as buffered reads (zig/src/core/direct_io.zig:100). It fails the same way on unmodified main (f8fe17d) on this host, with this change reverted. I haven't looked into it; it may be the filesystem's O_DIRECT behaviour here.

🤖 Generated with Claude Code

…er-cpu)

zig/src/server/root.zig's tests ran only in the macOS build (nativeServer); `zig build test` on Linux skipped them.
cuda_build.hostTests now builds them against the CUDA build's engine_api, and `zig build test-server-cpu` runs them
alone. 61/61 pass on a DGX Spark (GB10, aarch64 Linux, Zig 0.17.0).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HnW6f2YwLSNDv13YFUbZGz
@ashhart

ashhart commented Oct 10, 2026

Copy link
Copy Markdown
Owner

Thank you @MiaAI-Lab. This landed on main as b18a902 under your name: zig build test on Linux now runs the HTTP server's unit tests, and zig build test-server-cpu runs them alone (90 of 90 passed on a GB10 here; the direct_io failure you saw is gone since #486). GitHub shows this PR as closed rather than merged because we cherry-picked the commit without its AI-tool trailer lines, which main's history doesn't carry. It ships in the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants