Skip to content

fix(ci): enable C++ server unit tests in CI#384

Merged
davide221 merged 1 commit into
Luce-Org:mainfrom
cheese-cakee:ci/enable-server-unit-tests
Jun 15, 2026
Merged

fix(ci): enable C++ server unit tests in CI#384
davide221 merged 1 commit into
Luce-Org:mainfrom
cheese-cakee:ci/enable-server-unit-tests

Conversation

@cheese-cakee

@cheese-cakee cheese-cakee commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Context

test_server_unit is defined in server/CMakeLists.txt:874-902 and registered with ctest (line 901), but is never built or run in CI. The commented-out ctest block at .github/workflows/ci.yml:63-67 claims:

Server unit tests require libcurl-dev; skipped when CURL is absent.

This is incorrect. All curl usage in http_server.cpp is behind #ifdef DFLASH_HAS_CURL (lines 14, 60-254, 809, 954, 2187-2236). CMakeLists.txt conditionally defines DFLASH_HAS_CURL only when CURL_FOUND (lines 888-893). The test binary compiles and runs fine without curl — the proxy passthrough feature is simply disabled.

Bug

204 CPU-only tests covering critical server components are untested in CI:

Category Tests Critical path?
SSE emitter 19 Yes — every streaming response
Stop sequences 10 Yes — every request with stop tokens
Sampler 18 Yes — every non-greedy request
Prefix cache 5 Yes — prefix caching path
Jinja chat template 7 Yes — every chat request
Tool parser 33 Agent/tool-use flow
Reasoning parser 7 Reasoning mode
PFlash config 18 PFlash feature
Disk prefix cache 18 Disk-cache feature
Backend IPC 5 Remote-drafter IPC
+ 8 more sections 64 Various

Fix

  1. Add test_server_unit to the cmake build targets (line 60)
  2. Uncomment the ctest step (lines 63-67)
  3. Remove the incorrect comment about libcurl-dev

Changes

  • .github/workflows/ci.yml — added test_server_unit to build targets, uncommented ctest step

Verification

  • All curl code in http_server.cpp is #ifdef DFLASH_HAS_CURL guarded (5 occurrences)
  • CMakeLists.txt conditionally defines and links curl only when CURL_FOUND
  • CI already installs CUDA toolkit via Jimver/cuda-toolkit@v0.2.35
  • Test binary tests pure CPU logic: parsers, emitters, sampler, templates, cache hashing

Notes

  • The test binary links against dflash_common which includes ggml-cuda, but CI has CUDA installed so this is fine
  • No GPU or model files needed — tests exercise parser/emitter/sampler logic only

Review in cubic

test_server_unit (204 tests covering SSE emitter, tool parser,
reasoning parser, sampler, prefix cache, chat templates) was defined
in CMakeLists.txt and registered with ctest but never built or run
in CI. The comment claiming 'requires libcurl-dev' was incorrect —
all curl code is #ifdef-guarded and the binary compiles fine without it.

Add test_server_unit to the build targets and uncomment the ctest
step.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Re-trigger cubic

@davide221 davide221 merged commit befbf03 into Luce-Org:main Jun 15, 2026
5 checks passed
@cheese-cakee cheese-cakee deleted the ci/enable-server-unit-tests branch June 15, 2026 13:46
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